@mintlab/kitchen-sink
Advanced tools
Comparing version 3.6.0 to 3.6.1
@@ -6,2 +6,13 @@ # Change Log | ||
## [3.6.1](https://gitlab.com/zaaksysteem/zaaksysteem-frontend-mono/compare/@mintlab/kitchen-sink@3.6.0...@mintlab/kitchen-sink@3.6.1) (2020-01-09) | ||
### Bug Fixes | ||
* **Communication:** MINTY-2262 - allow e-mail addresses over multiple lines ([db44093](https://gitlab.com/zaaksysteem/zaaksysteem-frontend-mono/commit/db44093)) | ||
# [3.6.0](https://gitlab.com/zaaksysteem/zaaksysteem-frontend-mono/compare/@mintlab/kitchen-sink@3.5.1...@mintlab/kitchen-sink@3.6.0) (2019-10-17) | ||
@@ -8,0 +19,0 @@ |
@@ -6,3 +6,2 @@ "use strict"; | ||
}); | ||
exports.passOrGet = passOrGet; | ||
exports.callOrNothingAtAll = callOrNothingAtAll; | ||
@@ -19,19 +18,2 @@ | ||
/** | ||
* Get the return value of the argument if | ||
* it is a function or pass it through. | ||
* | ||
* @param {*} value | ||
* @param {Array} [argumentList] | ||
* @return {*} | ||
*/ | ||
function passOrGet(value) { | ||
var argumentList = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; | ||
if (typeof value === 'function') { | ||
return value.apply(void 0, _toConsumableArray(argumentList)); | ||
} | ||
return value; | ||
} | ||
/** | ||
* Call a value with optional arguments if it is a function. | ||
@@ -46,4 +28,2 @@ * | ||
*/ | ||
function callOrNothingAtAll(callback) { | ||
@@ -53,4 +33,4 @@ var argumentList = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; | ||
if (typeof callback === 'function') { | ||
return callback.apply(void 0, _toConsumableArray(passOrGet(argumentList))); | ||
return callback.apply(void 0, _toConsumableArray(typeof argumentList === 'function' ? argumentList() : argumentList)); | ||
} | ||
} |
@@ -54,8 +54,2 @@ "use strict"; | ||
}); | ||
Object.defineProperty(exports, "passOrGet", { | ||
enumerable: true, | ||
get: function get() { | ||
return _function.passOrGet; | ||
} | ||
}); | ||
Object.defineProperty(exports, "bind", { | ||
@@ -62,0 +56,0 @@ enumerable: true, |
@@ -26,3 +26,2 @@ "use strict"; | ||
assert.equal(_typeof(publicApi.getSegment), 'function', 'has an `getSegment` method'); | ||
assert.equal(_typeof(publicApi.passOrGet), 'function', 'has a `passOrGet` method'); | ||
assert.equal(_typeof(publicApi.objectifyParams), 'function', 'has an `objectifyParams` method'); | ||
@@ -29,0 +28,0 @@ assert.equal(_typeof(publicApi.performGetOnProperties), 'function', 'has a `performGetOnProperties` method'); |
@@ -8,4 +8,10 @@ "use strict"; | ||
var _function = require("./function"); | ||
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } | ||
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } | ||
function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } | ||
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } | ||
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } | ||
@@ -19,10 +25,2 @@ | ||
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } | ||
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } | ||
function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } | ||
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } | ||
/** | ||
@@ -78,3 +76,7 @@ * Iterate a `Map` of key/value functions until the first *key* | ||
return (0, _function.passOrGet)(fallback, valueArguments); | ||
if (typeof fallback === 'function') { | ||
return fallback.apply(void 0, _toConsumableArray(valueArguments)); | ||
} | ||
return fallback; | ||
} |
{ | ||
"name": "@mintlab/kitchen-sink", | ||
"version": "3.6.0", | ||
"version": "3.6.1", | ||
"license": "EUPL-1.1", | ||
@@ -43,3 +43,3 @@ "description": "Mintlab utility functions.", | ||
}, | ||
"gitHead": "e558dc977dc115e7fc7e8ff50d2b61fa9e0fb06c" | ||
"gitHead": "fd1b4292a10916f9609ff1dfa5710b1aa5495664" | ||
} |
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
67431
1351