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

async-helpers

Package Overview
Dependencies
Maintainers
2
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

async-helpers - npm Package Compare versions

Comparing version 0.3.12 to 0.3.13

36

index.js

@@ -458,7 +458,2 @@ /*!

var val = yield self.resolveId(key);
if (['string', 'number', 'boolean'].indexOf(typeOf(val)) === -1) {
console.log(`[WARNING]: AsyncHelpers#resolveIds ${formatWarning(key, val)}`);
}
str = str.split(key).join(val);

@@ -504,33 +499,2 @@ }

/**
* Format a warning message to provide better information about the
* helper and the arguments passed to the helper when the returned results aren't
* what's expected.
*
* @param {String} `key` Helper async id used to find more information about the helper.
* @param {Mixed} `val` Value returned from the helper
* @return {String} Formatted warning message
*/
function formatWarning(key, val) {
var helper = stash[key];
if (!helper) {
return `Expected returned result to be a string, number or boolean. Instead result is typeof "${typeOf(val)}"`;
}
var args = helper.args.slice();
args = args.filter(function(arg) {
if (!arg || typeof arg === 'function') {
return false;
}
return true;
}).map(function(arg) {
return stringify(arg);
});
var res = `Expected the returned result from "${helper.name}" to be a string, number or boolean. Instead result is typeof "${typeOf(val)}".`;
// res += `\nHelper arguments: \`${args.join(', ')}\``;
return res;
}
/**
* Create a prefix to use when generating an async id.

@@ -537,0 +501,0 @@ *

2

package.json
{
"name": "async-helpers",
"description": "Use async helpers in templates with engines that typically only handle sync helpers. Handlebars and Lodash have been tested.",
"version": "0.3.12",
"version": "0.3.13",
"homepage": "https://github.com/doowb/async-helpers",

@@ -6,0 +6,0 @@ "author": "Brian Woodward (https://github.com/doowb)",

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