vigour-stamp

generates unique stamps for changes, possiblity to observe progress of stamps

Usage no npm install needed!

<script type="module">
  import vigourStamp from 'https://cdn.skypack.dev/vigour-stamp';
</script>

README

vigour-stamp

Build Status js-standard-style npm version Coverage Status

Generates unique stamps for change, listens to close events

const vstamp = require('vigour-stamp')

// vstamp.create(type, source, override)
// results in click-1
const stamp = vstamp.create('click')

// fires when a stamp closes (is handled)
vstamp.on(stamp, () => console.log('closing'))

// fires after on listeners, when a stamp closes
vstamp.done(stamp, () => console.log('closed'))

// fires the onclose listener
vstamp.close(stamp)

const parsed = vstamp.parse(stamp)
// returns a parsed stamp { type: 'click', val: 1 }

// remove all listeners
vstamp.remove(stamp)

// to debug use
const debug = require('vstamp/debug')
debug(vstamp)
// this will throw errors when stamps are created while others are still open