No Description

toPath.js 273B

123456789
  1. import _ from './underscore.js';
  2. import isArray from './isArray.js';
  3. // Normalize a (deep) property `path` to array.
  4. // Like `_.iteratee`, this function can be customized.
  5. export default function toPath(path) {
  6. return isArray(path) ? path : [path];
  7. }
  8. _.toPath = toPath;