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

afterward

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

afterward - npm Package Compare versions

Comparing version 2.0.0 to 2.1.0

3

index.js

@@ -8,4 +8,3 @@ var setImmediate = require('timers').setImmediate,

setImmediate(cb, null, value)
})
done.catch(function (err) {
}, function (err) {
setImmediate(cb, err || new UnknownError('Unknown error'))

@@ -12,0 +11,0 @@ })

{
"name": "afterward",
"version": "2.0.0",
"version": "2.1.0",
"description": "Execute an error-first callback upon resolution or rejection of a promise (and return the promise)",

@@ -28,21 +28,32 @@ "main": "index.js",

"devDependencies": {
"@jasonpincin/standard": "~5.0.0-7",
"@jasonpincin/standard": "~5.0.0-8",
"es5-shim": "~4.3.1",
"faucet": "0.0.1",
"function-bind": "~1.0.2",
"istanbul": "~0.3.17",
"opn": "~1.0.1",
"istanbul": "~0.4.0",
"opn": "~1.0.2",
"phantomjs": "~1.9.18",
"promise-polyfill": "~2.1.0",
"tap-dot": "~1.0.0",
"tap-spec": "~4.1.0",
"tape": "~4.2.0",
"zuul": "~3.3.0"
"snazzy": "~2.0.1",
"tape": "~4.2.1",
"zuul": "~3.7.2"
},
"dependencies": {
"define-error": "~1.0.0"
"define-error": "~1.1.0"
},
"scripts": {
"test": "make npm-test",
"coverage": "make npm-coverage",
"browser-test": "make browser-test"
"test": "npm run -s faucet && npm run -s lint && npm run -s check-cover",
"test-nocover": "npm run -s faucet-nocover && npm run -s lint",
"travis-test": "npm run -s tap && ((cat coverage/lcov.info | coveralls) || exit 0)",
"travis-browser-test": "zuul -- test/*.js",
"faucet": "istanbul cover --report lcov --print none -- tape test/*.js | faucet",
"faucet-nocover": "tape test/**/*.js | faucet",
"tap": "istanbul cover --report lcov --print none -- tape test/*.js",
"tap-nocover": "tape test/**/*.js",
"phantom": "zuul --phantom -- test/*.js | faucet",
"lint": "standard | snazzy",
"check-cover": "istanbul check-coverage --statements 100 --branches 100 --functions 100 --lines 100 2>&1 | grep ERROR: ; (test ${PIPESTATUS[0]} -eq 0) || (istanbul report text; exit 1)",
"view-cover": "istanbul report text",
"open-cover": "open coverage/lcov-report/index.html"
}
}

@@ -12,3 +12,3 @@ var test = require('tape'),

afterward(p1, function (err, data) {
t.false(err, 'err is falsey on resolution')
t.notOk(err, 'err is falsey on resolution')
t.equal(data, 'hi', 'should invoke cb with resolved data')

@@ -22,4 +22,4 @@ })

afterward(p2, function (err, data) {
t.true(err, 'err is truthy on reject(null)')
t.false(data, 'should invoke cb with no data on reject')
t.ok(err, 'err is truthy on reject(undefined)')
t.notOk(data, 'should invoke cb with no data on reject')
})

@@ -30,3 +30,3 @@

t.equal(err.message, 'test', 'err.message is known on reject(err)')
t.false(data, 'should invoke cb with no data on reject')
t.notOk(data, 'should invoke cb with no data on reject')
})

@@ -40,3 +40,3 @@

var p4b = afterward(p4a, function (err, msg) {
t.false(err)
t.notOk(err)
t.equal(msg, 'hi', 'executes callback after async op')

@@ -43,0 +43,0 @@ })

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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