@13onthecode/utils
v0.0.1
Published
A collection of JavaScript/TypeScript utility tools
Downloads
3
Maintainers
Readme
@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-dev
Usage
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
IsArray
IsArrayBuffer
IsAsyncFunction
IsAsyncIterable
IsBigInt
IsBigInt64Array
IsBigUint64Array
IsBlob
IsBoolean
IsDataView
IsDate
IsEmptyArray
IsEmptyMap
IsEmptyObject
IsEmptySet
IsEmptyString
IsError
IsFalse
IsFile
IsFloat32Array
IsFloat64Array
IsFormData
IsFunction
IsInfiniteNumber
IsInt8Array
IsInt16Array
IsInt32Array
IsIterable
IsMap
IsNaN
IsNegativeNumber
IsNonEmptyArray
IsNonEmptyMap
IsNonEmptyObject
IsNonEmptySet
IsNonEmptyString
IsNull
IsNumber
IsObject
IsPositiveNumber
IsPrimitive
IsPromise
IsRegExp
IsSet
IsString
IsSymbol
IsTrue
IsTypedArray
IsUint8Array
IsUint8ClampedArray
IsUint16Array
IsUint32Array
IsUndefined
IsWeakMap
IsWeakRef
IsWeakSet
Node
Object
Runtime
String
CamelCase
CapitalCase
Capitalize
CustomCase
IsLowerCase
IsUpperCase
KebabCase
PascalCase
SnakeCase
SpaceCase
UnCapitalize
Check Also
License
MIT License © 2023-PRESENT 13OnTheCode