doorman

Only allow a ID to be registered once.

npm install doorman
1 downloads in the last day
5 downloads in the last week
26 downloads in the last month

doorman

Only allow a ID to be registered once.

build status

Installation

  npm install doorman

Usage

var dedupe = doorman()
dedupe('1') // true
dedupe('1') // false
dedupe('2') // true
dedupe('2') // false
dedupe.list() // { '1': true, '2': true }

Loading

var dedupe = doorman({ '1': true })
dedupe('1') // false
dedupe('2') // true
dedupe('2') // false

Credits

Paul Serby follow me on twitter @serby

Licence

Licensed under the New BSD License

npm loves you