engine-cache
Advanced tools
Comparing version 0.16.1 to 0.16.2
22
index.js
@@ -145,5 +145,11 @@ 'use strict'; | ||
function mergeHelpers(engine, opts) { | ||
function mergeHelpers(engine, options) { | ||
/*jshint validthis:true */ | ||
if (typeof options !== 'object') { | ||
var msg = expected('mergeHelpers', 'options').toBe('object'); | ||
throw new TypeError(msg); | ||
} | ||
try { | ||
var opts = utils.merge({}, options); | ||
var helpers = utils.merge({}, engine.helpers, opts.helpers); | ||
@@ -204,3 +210,7 @@ if (typeof helpers === 'object') { | ||
} catch (err) { | ||
return cb(err); | ||
if (typeof cb === 'function') { | ||
cb(err); | ||
return; | ||
} | ||
throw err; | ||
} | ||
@@ -263,5 +273,11 @@ } | ||
if (typeof str === 'string') { | ||
var tmp = opts.async; | ||
opts.async = true; | ||
fn = this.compile(str, opts); | ||
return fn(opts, cb); | ||
return fn(opts, function(err, content) { | ||
opts.async = tmp; | ||
if (err) return cb(err); | ||
cb(null, content); | ||
}); | ||
} | ||
@@ -268,0 +284,0 @@ |
{ | ||
"name": "engine-cache", | ||
"description": "express.js inspired template-engine manager.", | ||
"version": "0.16.1", | ||
"version": "0.16.2", | ||
"homepage": "https://github.com/jonschlinkert/engine-cache", | ||
@@ -36,22 +36,22 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)", | ||
"dependencies": { | ||
"async-helpers": "^0.3.4", | ||
"async-helpers": "^0.3.8", | ||
"extend-shallow": "^2.0.1", | ||
"helper-cache": "^0.7.2", | ||
"lazy-cache": "^0.2.3", | ||
"lazy-cache": "^2.0.1", | ||
"mixin-deep": "^1.1.3" | ||
}, | ||
"devDependencies": { | ||
"consolidate": "^0.13.1", | ||
"consolidate": "^0.14.1", | ||
"engine-handlebars": "^0.8.0", | ||
"engine-lodash": "^0.8.2", | ||
"engines": "^0.4.0", | ||
"gulp": "^3.9.0", | ||
"gulp-istanbul": "^0.10.0", | ||
"gulp": "^3.9.1", | ||
"gulp-istanbul": "^0.10.4", | ||
"gulp-jshint": "^1.11.2", | ||
"gulp-mocha": "^2.1.3", | ||
"handlebars": "^4.0.2", | ||
"jshint-stylish": "^2.0.1", | ||
"lodash": "^3.10.1", | ||
"mocha": "^2.3.2", | ||
"should": "^7.1.0", | ||
"gulp-mocha": "^2.2.0", | ||
"handlebars": "^4.0.5", | ||
"jshint-stylish": "^2.2.0", | ||
"lodash": "^4.12.0", | ||
"mocha": "^2.4.5", | ||
"should": "^8.3.1", | ||
"swig": "^1.4.2", | ||
@@ -58,0 +58,0 @@ "underscore": "^1.8.3" |
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
18747
382
+ Addedis-buffer@1.1.6(transitive)
+ Addedkind-of@3.2.2(transitive)
+ Addedlazy-cache@2.0.2(transitive)
+ Addedset-getter@0.1.1(transitive)
+ Addedto-object-path@0.3.0(transitive)
Updatedasync-helpers@^0.3.8
Updatedlazy-cache@^2.0.1