npm.io
1.0.0 • Published 8 years ago

is-new

Licence
MIT
Version
1.0.0
Deps
1
Vulns
0
Weekly
0

is-new

A function that remembers the values passed to it and returns true if a value is new. Packaged as a Node.js module.

Installation

npm install is-new --save

Usage

const IsNew = require('is-new')

// Create instance
const isNew = IsNew()

// Works with objects
const obj = {}
isNew(obj) // true
isNew(obj) // false

// Works with scalars
isNew('test') // true
isNew('test') // false

Keywords