partial-equal
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

partialEqual

Check if partial of object equal to another object. when pathes supplies, check the value of the pathes in the object if they equal

Usage: partialEqual<T>(input1: T, input2: T, ...pathes): boolean

import { partialEqual } from 'partial-equal'

partialEqual({ a: 1, b: 2 }, { a: 1, b: 1 })
// Output: true
partialEqual({ a: 2, b: 2 }, { a: 1, b: 2 }, `a`, `b`)
// Output: false
partialEqual({ a: 2, b: 2 }, { a: 1, b: 2 }, `b`))
// Output: true

This module exported from utilizes project.

Package Sidebar

Install

npm i partial-equal

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

54.1 kB

Total Files

5

Last publish

Collaborators

  • natqe3