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

async-deco

Package Overview
Dependencies
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

async-deco - npm Package Compare versions

Comparing version 7.0.0 to 7.0.1

4

package.json
{
"name": "async-deco",
"version": "7.0.0",
"version": "7.0.1",
"description": "A collection of decorators for adding features to asynchronous functions (callback or promise based).",

@@ -29,3 +29,3 @@ "main": "index.js",

"mocha": "^2.1.0",
"memoize-cache": "^3.2.4",
"memoize-cache": "^3.3.1",
"npm-release": "^1.0.0"

@@ -32,0 +32,0 @@ },

@@ -14,2 +14,3 @@ var defaultLogger = require('../utils/default-logger');

cache.query(args, function (err, cacheQuery) {
var key;
if (err) {

@@ -20,3 +21,3 @@ logger('cache-error', {cacheErr: err});

else if (cacheQuery.cached === true && !cacheQuery.stale) {
logger('cache-hit', {key: cacheQuery.key, result: cacheQuery});
logger('cache-hit', {key: cacheQuery.key, result: cacheQuery, timing: cacheQuery.timing});
cb(null, cacheQuery.hit);

@@ -28,7 +29,8 @@ }

else {
logger('cache-miss', {key: cacheQuery.key});
logger('cache-miss', {key: cacheQuery.key, timing: cacheQuery.timing});
args[args.length - 1] = function (err, res) {
if (!err) {
if (cache.push(args, res)) {
logger('cache-set', {args: args, res: res});
key = cache.push(args, res);
if (key) {
logger('cache-set', {key: key, args: args, res: res});
}

@@ -35,0 +37,0 @@ }

@@ -21,3 +21,3 @@ var assert = require('chai').assert;

setTimeout(function () {
resolve(undefined, a);
resolve(a);
}, 0);

@@ -68,3 +68,3 @@ });

setTimeout(function () {
resolve(undefined, a);
resolve(a);
}, 0);

@@ -71,0 +71,0 @@ });

@@ -81,3 +81,3 @@ var assert = require('chai').assert;

func(5).then(function (err, value) {
func(5).then(function (value) {
assert.equal(value, 20);

@@ -84,0 +84,0 @@ });

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