0.0.1-beta.1 • Published 2 years ago
@datadayrepos/js-utils v0.0.1-beta.1
ts-template
General utils for object and array manipulations in javascript
🛠 Usage
pnpm i @datadayrepos/js-utils
💻 Code
Several helpers across the main js types:
// array methods
import {
cutOff,
dedupe,
ensure,
fillArr,
insert,
intersection,
isFirst,
isLast,
merge,
moveDown,
moveDownAt,
moveUp,
moveUpAt,
remove,
removeAt,
toMap,
union,
} from './array'
// array-objects methods
import {
filterArrayOfObjectsSingleKey,
filterArrayOfObjectsTwoKeys,
} from './arrObj'
// number methods
import {
gcd, // greatest common divisor
lcm, // least common multiple
} from './number'
// object methods
import {
isEmptyObject,
isObject,
isObjectSimple,
isArguments,
mergeObjects,
removeMatchingProperties,
deepEquals,
filterObject,
getPathVal,
setPathVal,
deleteRootPathVal, // todo difference?
deleteRootArrVal,
nodePath2ClassName,
isRootNodePath,
computedCurPath,
path2prop,
} from './object'
// string methods
import {
capitalizeWords,
lowerCase,
pad,
slicestr,
toCamelCase,
toSnakeCase,
} from './string'
📄 License
MIT License © 2023 Ivar Strand
0.0.1-beta.1
2 years ago