async-helpers
Advanced tools
Comparing version 0.3.6 to 0.3.7
19
index.js
@@ -119,6 +119,11 @@ /*! | ||
for (var key in helper) { | ||
helper[key] = wrapper(key, helper[key], this); | ||
if (helper[key].wrapped !== true) { | ||
helper[key] = wrapper(key, helper[key], this); | ||
} | ||
} | ||
return helper; | ||
} else { | ||
if (helper.wrapped === true) { | ||
return helper; | ||
} | ||
return wrapper(name, helper, this); | ||
@@ -140,3 +145,3 @@ } | ||
return function() { | ||
function wrapped() { | ||
var argRefs = []; | ||
@@ -168,3 +173,9 @@ var len = arguments.length; | ||
return obj.id; | ||
}; | ||
} | ||
Object.defineProperty(wrapped, 'wrapped', { | ||
configurable: true, | ||
enumerable: false, | ||
value: true | ||
}); | ||
return wrapped; | ||
} | ||
@@ -270,3 +281,3 @@ | ||
try { | ||
res = helper.fn.apply(helper.thisArg, args); | ||
res = helper.fn.apply(helper.fn, args); | ||
if(re.test(res)) { | ||
@@ -273,0 +284,0 @@ return self.resolveIds(res, done); |
{ | ||
"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.6", | ||
"version": "0.3.7", | ||
"homepage": "https://github.com/doowb/async-helpers", | ||
@@ -21,3 +21,3 @@ "author": { | ||
"engines": { | ||
"node": ">=0.10.0" | ||
"node": ">=4.0.0" | ||
}, | ||
@@ -52,2 +52,5 @@ "scripts": { | ||
"layout": "default", | ||
"tasks": [ | ||
"readme" | ||
], | ||
"plugins": [ | ||
@@ -65,4 +68,10 @@ "gulp-format-md" | ||
}, | ||
"task": "readme" | ||
"reflinks": [ | ||
"co", | ||
"verb" | ||
], | ||
"lint": { | ||
"reflinks": true | ||
} | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
# async-helpers [![NPM version](https://img.shields.io/npm/v/async-helpers.svg)](https://www.npmjs.com/) [![Build Status](https://img.shields.io/travis/doowb/async-helpers.svg)](index.js#L26) | ||
# async-helpers [![NPM version](https://img.shields.io/npm/v/async-helpers.svg)](https://www.npmjs.com/package/async-helpers) [![Build Status](https://img.shields.io/travis/doowb/async-helpers.svg)](https://travis-ci.org/doowb/async-helpers) | ||
@@ -71,3 +71,3 @@ > Use async helpers in templates with engines that typically only handle sync helpers. Handlebars and Lodash have been tested. | ||
### [.wrap](index.js#L182) | ||
### [.wrap](index.js#L193) | ||
@@ -88,3 +88,3 @@ Wrap a helper with async handling capibilities. | ||
### [.reset](index.js#L203) | ||
### [.reset](index.js#L214) | ||
@@ -101,3 +101,3 @@ Reset all the stashed helpers. | ||
### [.resolveId](index.js#L228) | ||
### [.resolveId](index.js#L239) | ||
@@ -123,3 +123,3 @@ Resolve a stashed helper by the generated id. This is a generator function and should be used with [co](https://github.com/tj/co) | ||
### [.resolveIds](index.js#L319) | ||
### [.resolveIds](index.js#L330) | ||
@@ -190,2 +190,2 @@ After rendering a string using wrapped async helpers, use `resolveIds` to invoke the original async helpers and replace the async ids with results from the async helpers. | ||
_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on March 10, 2016._ | ||
_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on March 11, 2016._ |
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
18793
413