0.0.1 • Published 2 years ago
@13onthecode/utils v0.0.1
@13OnTheCode/Utils
English | 简体中文
A collection of JavaScript/TypeScript utility tools
Features
- Zero dependency
- Tree Shakable
Prerequisites
Node.js
- Version >= 16.0.0
- ESM Project
Install
npm install @13onthecode/utils --save-devUsage
import { mergeObject } from '@13onthecode/utils'
const foo = {
foo: 'foo',
other: {
foo: 'foo'
}
}
const bar = {
bar: 'bar',
other: {
bar: 'bar'
}
}
const merged = mergeObject(foo, bar)
// => {
// foo: "foo"
// bar: "bar"
// other: {
// bar: 'bar'
// }
// }
const deepMerged = mergeObject(foo, bar, { mode: 'deep' })
// => {
// foo: "foo"
// bar: "bar"
// other: {
// foo: "foo"
// bar: "bar"
// }
// }API
Array
Collocation
Guard
IsArrayIsArrayBufferIsAsyncFunctionIsAsyncIterableIsBigIntIsBigInt64ArrayIsBigUint64ArrayIsBlobIsBooleanIsDataViewIsDateIsEmptyArrayIsEmptyMapIsEmptyObjectIsEmptySetIsEmptyStringIsErrorIsFalseIsFileIsFloat32ArrayIsFloat64ArrayIsFormDataIsFunctionIsInfiniteNumberIsInt8ArrayIsInt16ArrayIsInt32ArrayIsIterableIsMapIsNaNIsNegativeNumberIsNonEmptyArrayIsNonEmptyMapIsNonEmptyObjectIsNonEmptySetIsNonEmptyStringIsNullIsNumberIsObjectIsPositiveNumberIsPrimitiveIsPromiseIsRegExpIsSetIsStringIsSymbolIsTrueIsTypedArrayIsUint8ArrayIsUint8ClampedArrayIsUint16ArrayIsUint32ArrayIsUndefinedIsWeakMapIsWeakRefIsWeakSet
Node
Object
Runtime
String
CamelCaseCapitalCaseCapitalizeCustomCaseIsLowerCaseIsUpperCaseKebabCasePascalCaseSnakeCaseSpaceCaseUnCapitalize
Check Also
License
MIT License © 2023-PRESENT 13OnTheCode
0.0.1
2 years ago