Skip to content

suressk/sure-utils

Repository files navigation

Install

Using npm, yarn or pnpm

npm i sure-utils --save

Usage

import { hasChanged, isNull } from 'sure-utils'
// import * as sureUtils from 'sure-utils'

console.log(isNull(null)) // true
console.log(isNull(1)) // false

const data = { a: 1 }
const newData = data
newData.a = 'b'
console.log(hasChanged(newData, data)) // false