diff options
Diffstat (limited to 'lib/handlebars/base.js')
-rw-r--r-- | lib/handlebars/base.js | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/lib/handlebars/base.js b/lib/handlebars/base.js index f9d8aa9..9a1bf3e 100644 --- a/lib/handlebars/base.js +++ b/lib/handlebars/base.js @@ -12,25 +12,11 @@ export var REVISION_CHANGES = { 4: '>= 1.0.0' }; -var toString = Object.prototype.toString, +var isArray = Utils.isArray, + isFunction = Utils.isFunction, + toString = Utils.toString, objectType = '[object Object]'; -// Sourced from lodash -// https://github.com/bestiejs/lodash/blob/master/LICENSE.txt -var isFunction = function(value) { - return typeof value === 'function'; -}; -// fallback for older versions of Chrome and Safari -if (isFunction(/x/)) { - isFunction = function(value) { - return typeof value === 'function' && toString.call(value) === '[object Function]'; - }; -} - -function isArray(value) { - return (value && typeof value === 'object') ? toString.call(value) === '[object Array]' : false; -} - export function HandlebarsEnvironment(helpers, partials) { this.helpers = helpers || {}; this.partials = partials || {}; |