Skip to content

A collection of JavaScript/TypeScript utility tools

License

Notifications You must be signed in to change notification settings

13OnTheCode/utils

Repository files navigation

@13OnTheCode/Utils

JavaScript

Version License

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

Map

Node

Object

Runtime

Set

String

Check Also

License

MIT License © 2023-PRESENT 13OnTheCode

About

A collection of JavaScript/TypeScript utility tools

Resources

License

Stars

Watchers

Forks