helper-cache
Advanced tools
Comparing version 0.7.1 to 0.7.2
15
index.js
'use strict'; | ||
var extend = require('extend-shallow'); | ||
var bind = require('lodash.bind'); | ||
var lazy = require('lazy-cache')(require); | ||
lazy('extend-shallow', 'extend'); | ||
lazy('lodash.bind', 'bind'); | ||
@@ -27,3 +28,3 @@ /** | ||
defineGetter(this, 'options', function () { | ||
return extend({bind: false, thisArg: null }, opts); | ||
return lazy.extend({bind: false, thisArg: null }, opts); | ||
}); | ||
@@ -68,3 +69,3 @@ } | ||
if (fn.hasOwnProperty(prop)) { | ||
res[prop] = bind(fn[prop], thisArg); | ||
res[prop] = lazy.bind(fn[prop], thisArg); | ||
} | ||
@@ -74,3 +75,3 @@ } | ||
} else { | ||
this[name] = bind(fn, thisArg); | ||
this[name] = lazy.bind(fn, thisArg); | ||
} | ||
@@ -126,3 +127,3 @@ } else { | ||
val.async = true; | ||
res[prop] = bind(val, thisArg); | ||
res[prop] = lazy.bind(val, thisArg); | ||
} | ||
@@ -133,3 +134,3 @@ } | ||
fn.async = true; | ||
this[name] = bind(fn, thisArg); | ||
this[name] = lazy.bind(fn, thisArg); | ||
} | ||
@@ -136,0 +137,0 @@ } else { |
{ | ||
"name": "helper-cache", | ||
"description": "Easily register and get helper functions to be passed to any template engine or node.js application. Methods for both sync and async helpers.", | ||
"version": "0.7.1", | ||
"version": "0.7.2", | ||
"homepage": "https://github.com/jonschlinkert/helper-cache", | ||
"repository": "jonschlinkert/helper-cache", | ||
"author": "Jon Schlinkert (https://github.com/jonschlinkert)", | ||
@@ -13,6 +14,2 @@ "maintainers": [ | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/jonschlinkert/helper-cache.git" | ||
}, | ||
"bugs": { | ||
@@ -42,3 +39,4 @@ "url": "https://github.com/jonschlinkert/helper-cache/issues" | ||
"dependencies": { | ||
"extend-shallow": "^1.1.4", | ||
"extend-shallow": "^2.0.1", | ||
"lazy-cache": "^0.2.3", | ||
"lodash.bind": "^3.1.0" | ||
@@ -45,0 +43,0 @@ }, |
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
12196
234
3
1
+ Addedlazy-cache@^0.2.3
+ Addedextend-shallow@2.0.1(transitive)
+ Addedis-extendable@0.1.1(transitive)
+ Addedlazy-cache@0.2.7(transitive)
- Removedextend-shallow@1.1.4(transitive)
- Removedkind-of@1.1.0(transitive)
Updatedextend-shallow@^2.0.1