updeep-remeda/lib/util/splitPath.js

6 lines
156 B
JavaScript
Raw Normal View History

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