Comparing version 1.4.2 to 1.4.3
@@ -6,4 +6,8 @@ 'use strict'; | ||
var is = function is(val, type) { | ||
var objectType = Object.prototype.toString.call(val); | ||
return !!objectType.slice(8, objectType.length - 1).match(new RegExp(type, 'gi')); | ||
if (typeof val === 'function' && type === 'function') { | ||
return true; | ||
} else { | ||
var objectType = Object.prototype.toString.call(val); | ||
return !!objectType.slice(8, objectType.length - 1).match(new RegExp(type, 'gi')); | ||
} | ||
}; | ||
@@ -23,3 +27,7 @@ | ||
var handleBlocks = function handleBlocks(block, val) { | ||
return is(val, 'string') && val.length > 0 ? block + '__' + val : val; | ||
if (is(val, 'string') && val.length > 0) { | ||
return block + '__' + val; | ||
} else { | ||
return val; | ||
} | ||
}; | ||
@@ -26,0 +34,0 @@ |
{ | ||
"name": "b3m", | ||
"version": "1.4.2", | ||
"version": "1.4.3", | ||
"main": "build/index.js", | ||
@@ -5,0 +5,0 @@ "repository": { |
5802
53