1.0.2 • Published 12 months ago

schob v1.0.2

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

Schob

Schob

Installation

pnpm add @huntersofbook/schob

Usage

import { merge } from '@huntersofbook/schob'

const schema = {
  isPro: false,
  darkMode: false,
  pages: {
    home: false,
    settings: false,
  },
}

const newData = {
  isPro: false,
  darkMode: true,
  pages: {
    home: false,
    settings: true,
    hello: false,
  },
  dd: 'dd',
  tt: {
    dd: 'dd',
  },
  cc: [{ dd: 'dd' }],
}

const res = merge({ schema, newData })

Output

{
    isPro: false,
    darkMode: true,
    pages: { home: false, settings: true },
 }

Sponsors

License

MIT License © 2022-PRESENT productdevbook