@13onthecode/utils
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

@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

Node

Object

Runtime

String

Check Also

License

MIT License © 2023-PRESENT 13OnTheCode

/@13onthecode/utils/

    Package Sidebar

    Install

    npm i @13onthecode/utils

    Weekly Downloads

    2

    Version

    0.0.1

    License

    MIT

    Unpacked Size

    30 kB

    Total Files

    6

    Last publish

    Collaborators

    • 13onthecode