cimpress-handlebars-helpers
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -8,4 +8,8 @@ # Changelog | ||
## [0.0.2] - 2018.12.13 | ||
### Fixed | ||
- Return empty array instead of throwing error | ||
## [0.0.1] - 2018.12.13 | ||
### Added | ||
- Initial release |
@@ -10,9 +10,9 @@ 'use strict'; | ||
if (!collection || !Array.isArray(collection)) { | ||
throw new Error('filterByValues expects array as first argument (collection)'); | ||
return []; | ||
} | ||
if (!key || typeof key !== 'string') { | ||
throw new Error('filterByValues expects string as second argument (key)'); | ||
return []; | ||
} | ||
if (!values || !Array.isArray(values)) { | ||
throw new Error('filterByValues expects array as third argument (values)'); | ||
return []; | ||
} | ||
@@ -19,0 +19,0 @@ |
@@ -11,6 +11,6 @@ 'use strict'; | ||
if (!array || !Array.isArray(array)) { | ||
throw new Error('flatMap expects array as first argument (array)'); | ||
return []; | ||
} | ||
if (!path || typeof path !== 'string') { | ||
throw new Error('flatMap expects string as second argument (path)'); | ||
return []; | ||
} | ||
@@ -17,0 +17,0 @@ return flatMap(array, function (element) { |
{ | ||
"name": "cimpress-handlebars-helpers", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "A set of simple handlebars helpers", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
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
4942