updeep-remeda/lib/util/splitPath.js

8 lines
172 B
JavaScript
Raw Normal View History

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