Travis build: 1308 [cron]

This commit is contained in:
30secondsofcode
2018-01-18 20:09:27 +00:00
parent 8ca337b663
commit b76eb424c1
12 changed files with 115 additions and 47 deletions

View File

@ -1,9 +1,9 @@
const get = (from, ...selectors) =>
[...selectors].map(s =>
s
.replace(/\[([^\[\]]*)\]/g, '.$1.')
.split('.')
.filter(t => t !== '')
.reduce((prev, cur) => prev && prev[cur], from)
);
module.exports = get
[...selectors].map(s =>
s
.replace(/\[([^\[\]]*)\]/g, '.$1.')
.split('.')
.filter(t => t !== '')
.reduce((prev, cur) => prev && prev[cur], from)
);
module.exports = get