updeep-remeda/lib/util/splitPath.js

8 lines
168 B
JavaScript
Raw Normal View History

2016-01-14 16:02:59 +00:00
import reject from 'lodash/reject';
2015-08-07 03:48:04 +00:00
export default function splitPath(path) {
return Array.isArray(path) ?
path :
reject((path + '').split('.'), x => !x);
2015-08-07 03:48:04 +00:00
}