Comparing version 1.0.13 to 1.0.14
@@ -23,2 +23,3 @@ "use strict"; | ||
exports.nearestPowerOf2 = nearestPowerOf2; | ||
exports.clearProps = clearProps; | ||
//************************************************************************************** | ||
@@ -768,2 +769,34 @@ /** | ||
//************************************************************************************** | ||
/** | ||
* Delete properties by name from specified object | ||
* @param {Object} object Object to delete properties from | ||
* @param {Array.<string>} propsArray Array of properties names | ||
*/ | ||
function clearProps(object, propsArray) { | ||
var _iteratorNormalCompletion7 = true; | ||
var _didIteratorError7 = false; | ||
var _iteratorError7 = undefined; | ||
try { | ||
for (var _iterator7 = propsArray[Symbol.iterator](), _step7; !(_iteratorNormalCompletion7 = (_step7 = _iterator7.next()).done); _iteratorNormalCompletion7 = true) { | ||
var prop = _step7.value; | ||
delete object[prop]; | ||
} | ||
} catch (err) { | ||
_didIteratorError7 = true; | ||
_iteratorError7 = err; | ||
} finally { | ||
try { | ||
if (!_iteratorNormalCompletion7 && _iterator7.return) { | ||
_iterator7.return(); | ||
} | ||
} finally { | ||
if (_didIteratorError7) { | ||
throw _iteratorError7; | ||
} | ||
} | ||
} | ||
} | ||
//************************************************************************************** | ||
//# sourceMappingURL=utils.js.map |
@@ -37,4 +37,4 @@ { | ||
"name": "pvutils", | ||
"version": "1.0.13", | ||
"version": "1.0.14", | ||
"license": "MIT" | ||
} |
@@ -680,1 +680,12 @@ //************************************************************************************** | ||
//************************************************************************************** | ||
/** | ||
* Delete properties by name from specified object | ||
* @param {Object} object Object to delete properties from | ||
* @param {Array.<string>} propsArray Array of properties names | ||
*/ | ||
export function clearProps(object, propsArray) | ||
{ | ||
for(const prop of propsArray) | ||
delete object[prop]; | ||
} | ||
//************************************************************************************** |
Sorry, the diff of this file is not supported yet
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
89386
1280