updeep-remeda/lib/util/splitPath.js
Aaron Jensen 5c0855b9df Add u.is
2015-08-06 20:48:04 -07:00

8 lines
172 B
JavaScript

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