Skip to content

Commit

Permalink
feat: Add pull method as an alias for dataset
Browse files Browse the repository at this point in the history
feat: Add pull method as an alias for dataset
fix(stringToStyles): Old browsers are returning null instead of en empty string when style attribute is empty. It won't throw a TypeError anymore.
docs: update docs
test: update tests
  • Loading branch information
liqueurdetoile committed Feb 21, 2018
1 parent 6c1355d commit b5751e6
Show file tree
Hide file tree
Showing 9 changed files with 528 additions and 311 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ console.log(doa.data.test) //Output 'fixture'
You can only treat with the whole data object through this property. *Data is kept under a "private" `_data` property that can be accessed though I do not recommend it, especially for imports*

#### Fetch dataset
Specific dataset linked to a key can be retrieved with the `dataset` method and using dot notation :
Specific dataset linked to a key can be retrieved with the `dataset` method (or its alias `pull` method) and using dot notation :
```javascript
var doa = new ObjectArray({
dat: {
Expand All @@ -171,6 +171,8 @@ var doa = new ObjectArray({

// Get the dataset
console.log(doa.dataset('dat.long')) //Output {path: 'fixture1', dream: 'fixture2'}
// or
console.log(doa.pull('dat.long')) //Output {path: 'fixture1', dream: 'fixture2'}
```
Calling `doa.dataset()` will return the whole data object.

Expand Down
2 changes: 1 addition & 1 deletion dist/objectarray.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b5751e6

Please sign in to comment.