updeep-remeda/lib/util/splitPath.js
2020-04-02 15:16:13 +01:00

6 lines
158 B
JavaScript

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