updeep-remeda/lib/util/splitPath.js
2017-04-18 17:55:46 -07:00

6 lines
156 B
JavaScript

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