Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

brisky-stamp

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

brisky-stamp - npm Package Compare versions

Comparing version 2.0.3 to 2.0.4

21

lib/index.js

@@ -1,8 +0,6 @@

'use strict'
var on = false
exports.cnt = 0
const bs = global.briskystamp = { on: false, cnt: 0 }
// add timestamp option -- maybe allways use it
exports.create = (type, src, override) => {
var stamp = override || ++exports.cnt
var stamp = override || ++bs.cnt
if (type) {

@@ -18,6 +16,6 @@ stamp = type + '-' + stamp

exports.on = fn => {
if (!on) {
on = [ fn ]
if (!bs.on) {
bs.on = [ fn ]
} else {
on.push(fn)
bs.on.push(fn)
}

@@ -27,9 +25,12 @@ }

exports.close = () => {
const on = bs.on
if (on) {
for (let i = 0; i < on.length; i++) { on[i]() }
on = false
for (let i = 0; i < on.length; i++) {
on[i]()
}
bs.on = false
}
}
exports.clear = () => { on = false }
exports.clear = () => { bs.on = false }

@@ -36,0 +37,0 @@ exports.parse = stamp => {

{
"name": "brisky-stamp",
"version": "2.0.3",
"version": "2.0.4",
"description": "Generate unique meta information for change in a system",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -7,6 +7,7 @@ 'use strict'

bstamp = require('../')
const gbstamp = global.briskystamp
t.plan(4)
stamp('default', bstamp.cnt + 1, bstamp.create())
stamp('type', 'click-' + (bstamp.cnt + 1), bstamp.create('click'))
stamp('source', 'mac|' + (bstamp.cnt + 1), bstamp.create(void 0, 'mac'))
stamp('default', gbstamp.cnt + 1, bstamp.create())
stamp('type', 'click-' + (gbstamp.cnt + 1), bstamp.create('click'))
stamp('source', 'mac|' + (gbstamp.cnt + 1), bstamp.create(void 0, 'mac'))
stamp('all', 'mac|click-override', bstamp.create('click', 'mac', 'override'))

@@ -13,0 +14,0 @@ function stamp (label, result, val) {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc