Comparing version 1.0.1 to 1.0.2
@@ -1,2 +0,2 @@ | ||
const sliced = require('sliced') | ||
var sliced = require('sliced') | ||
@@ -10,3 +10,3 @@ module.exports = { | ||
return function () { | ||
const errOrValue = fn.apply(this, arguments) | ||
var errOrValue = fn.apply(this, arguments) | ||
return errOrValue instanceof Error | ||
@@ -20,4 +20,4 @@ ? errOrValue | ||
return function () { | ||
const args = sliced(arguments) | ||
const cb = args.pop() | ||
var args = sliced(arguments) | ||
var cb = args.pop() | ||
fn.apply(this, args.concat([function (err, value) { | ||
@@ -24,0 +24,0 @@ if (err) cb(err) |
@@ -1,2 +0,2 @@ | ||
const sliced = require('sliced') | ||
var sliced = require('sliced') | ||
@@ -10,3 +10,3 @@ module.exports = { | ||
return function () { | ||
const args = sliced(arguments) | ||
var args = sliced(arguments) | ||
return hook.call(this, fn, args) | ||
@@ -18,6 +18,6 @@ } | ||
return function () { | ||
const args = sliced(arguments) | ||
const cb = args.pop() | ||
var args = sliced(arguments) | ||
var cb = args.pop() | ||
hook.call(this, fn, args, cb) | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
const sliced = require('sliced') | ||
var sliced = require('sliced') | ||
@@ -10,6 +10,6 @@ module.exports = { | ||
return function () { | ||
const args = sliced(arguments) | ||
const err = hook.call(this, args) | ||
var args = sliced(arguments) | ||
var err = hook.call(this, args) | ||
if (err instanceof Error) return err | ||
const newArgs = err | ||
var newArgs = err | ||
return fn.apply(this, newArgs) | ||
@@ -21,4 +21,4 @@ } | ||
return function () { | ||
const args = sliced(arguments) | ||
const cb = args.pop() | ||
var args = sliced(arguments) | ||
var cb = args.pop() | ||
hook.call(this, args, function (err, newArgs) { | ||
@@ -25,0 +25,0 @@ if (err) cb(err) |
@@ -1,4 +0,4 @@ | ||
const before = require('./before') | ||
const after = require('./after') | ||
const around = require('./around') | ||
var before = require('./before') | ||
var after = require('./after') | ||
var around = require('./around') | ||
@@ -5,0 +5,0 @@ module.exports = { |
{ | ||
"name": "aspects", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "before, after, and around hooks for sync and sync functions", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13961