12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- import arrayMap from './_arrayMap.js';
- import baseAt from './_baseAt.js';
- import basePullAt from './_basePullAt.js';
- import compareAscending from './_compareAscending.js';
- import flatRest from './_flatRest.js';
- import isIndex from './_isIndex.js';
- var pullAt = flatRest(function(array, indexes) {
- var length = array == null ? 0 : array.length,
- result = baseAt(array, indexes);
- basePullAt(array, arrayMap(indexes, function(index) {
- return isIndex(index, length) ? +index : index;
- }).sort(compareAscending));
- return result;
- });
- export default pullAt;
|