Socket
Socket
Sign inDemoInstall

wrappy

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.0.1

2

package.json
{
"name": "wrappy",
"version": "1.0.0",
"version": "1.0.1",
"description": "Callback wrapping utility",

@@ -5,0 +5,0 @@ "main": "wrappy.js",

@@ -5,3 +5,3 @@ var test = require('tap').test

test('basic', function (t) {
var once = wrappy(function (cb) {
function onceifier (cb) {
var called = false

@@ -13,3 +13,6 @@ return function () {

}
})
}
onceifier.iAmOnce = {}
var once = wrappy(onceifier)
t.equal(once.iAmOnce, onceifier.iAmOnce)

@@ -16,0 +19,0 @@ var called = 0

@@ -13,2 +13,6 @@ // Returns a wrapper function that returns a wrapped callback

Object.keys(fn).forEach(function (k) {
wrapper[k] = fn[k]
})
return wrapper

@@ -15,0 +19,0 @@

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc