0.0.1 • Published 5 months ago

@13onthecode/utils v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

@13OnTheCode/Utils

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

Node

Object

Runtime

String

Check Also

License

MIT License © 2023-PRESENT 13OnTheCode

0.0.1

5 months ago