Comparing version 0.5.0 to 0.5.1
{ | ||
"name": "lazy-ass", | ||
"main": "index.js", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"homepage": "https://github.com/bahmutov/lazy-ass", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
(function initLazyAss() { | ||
function isArrayLike(a) { | ||
return a && typeof a.length === 'number'; | ||
} | ||
function formMessage(args) { | ||
@@ -24,2 +28,5 @@ var msg = args.reduce(function (total, arg, k) { | ||
} | ||
if (isArrayLike(arg)) { | ||
return total + JSON.stringify(Array.prototype.slice.call(arg)); | ||
} | ||
if (arg instanceof Error) { | ||
@@ -26,0 +33,0 @@ return total + arg.name + ' ' + arg.message; |
{ | ||
"name": "lazy-ass", | ||
"description": "Lazy assertions without performance penalty", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"author": "Gleb Bahmutov <gleb.bahmutov@gmail.com>", | ||
@@ -6,0 +6,0 @@ "bugs": { |
@@ -163,2 +163,13 @@ /* global lazyAss, la */ | ||
}); | ||
describe('serialize arguments', function () { | ||
function foo() { | ||
la(false, arguments); | ||
} | ||
it('serializes arguments object', function () { | ||
expect(function () { | ||
foo('something'); | ||
}).to.throwException(/something/); | ||
}); | ||
}); | ||
}); |
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
23138
411