fix to follow the code style

This commit is contained in:
musou1500
2017-12-19 20:07:37 +09:00
parent adea96548d
commit b3e053a87b

View File

@ -6,9 +6,7 @@ If property not exists returns `undefined`.
```js
const select = (from, selector) =>
selector
.split('.')
.reduce((prev, cur) => prev && prev[cur], from);
selector.split('.').reduce((prev, cur) => prev && prev[cur], from);
// const obj = {selector: {to: {val: 'val to select'}}};
// select(obj, 'selector.to.val'); -> 'val to select'