updeep-remeda/lib/util/splitPath.js
2016-02-04 06:19:27 -08:00

8 lines
161 B
JavaScript

import reject from 'lodash/reject';
export default function splitPath(path) {
return Array.isArray(path) ?
path :
reject(path.split('.'), x => !x);
}