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

once

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

once - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

3

once.js

@@ -1,2 +0,3 @@

module.exports = once
var wrappy = require('wrappy')
module.exports = wrappy(once)

@@ -3,0 +4,0 @@ once.proto = once(function () {

{
"name": "once",
"version": "1.3.0",
"version": "1.3.1",
"description": "Run a function exactly one time",

@@ -9,3 +9,5 @@ "main": "once.js",

},
"dependencies": {},
"dependencies": {
"wrappy": "1"
},
"devDependencies": {

@@ -12,0 +14,0 @@ "tap": "~0.3.0"

@@ -6,7 +6,10 @@ var test = require('tap').test

var f = 0
var foo = once(function (g) {
function fn (g) {
t.equal(f, 0)
f ++
return f + g + this
})
}
fn.ownProperty = {}
var foo = once(fn)
t.equal(fn.ownProperty, foo.ownProperty)
t.notOk(foo.called)

@@ -13,0 +16,0 @@ for (var i = 0; i < 1E3; i++) {

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