@tds/util-helpers
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -6,2 +6,13 @@ # Change Log | ||
# [1.2.0](https://github.com/telus/tds-core/compare/@tds/util-helpers@1.1.0...@tds/util-helpers@1.2.0) (2019-09-06) | ||
### Features | ||
* **util-helpers:** add safeRest to util-helpers ([0f9b3a1](https://github.com/telus/tds-core/commit/0f9b3a1)) | ||
# [1.1.0](https://github.com/telus/tds-core/compare/@tds/util-helpers@1.0.0...@tds/util-helpers@1.1.0) (2019-08-20) | ||
@@ -8,0 +19,0 @@ |
@@ -26,5 +26,53 @@ 'use strict'; | ||
function _objectWithoutPropertiesLoose(source, excluded) { | ||
if (source == null) return {}; | ||
var target = {}; | ||
var sourceKeys = Object.keys(source); | ||
var key, i; | ||
for (i = 0; i < sourceKeys.length; i++) { | ||
key = sourceKeys[i]; | ||
if (excluded.indexOf(key) >= 0) continue; | ||
target[key] = source[key]; | ||
} | ||
return target; | ||
} | ||
var objectWithoutPropertiesLoose = _objectWithoutPropertiesLoose; | ||
function _objectWithoutProperties(source, excluded) { | ||
if (source == null) return {}; | ||
var target = objectWithoutPropertiesLoose(source, excluded); | ||
var key, i; | ||
if (Object.getOwnPropertySymbols) { | ||
var sourceSymbolKeys = Object.getOwnPropertySymbols(source); | ||
for (i = 0; i < sourceSymbolKeys.length; i++) { | ||
key = sourceSymbolKeys[i]; | ||
if (excluded.indexOf(key) >= 0) continue; | ||
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; | ||
target[key] = source[key]; | ||
} | ||
} | ||
return target; | ||
} | ||
var objectWithoutProperties = _objectWithoutProperties; | ||
var safeRest = (function (_ref) { | ||
var style = _ref.style, | ||
className = _ref.className, | ||
as = _ref.as, | ||
props = objectWithoutProperties(_ref, ["style", "className", "as"]); | ||
return props; | ||
}); | ||
/* eslint-disable import/prefer-default-export */ | ||
exports.getCopy = getCopy; | ||
exports.safeRest = safeRest; | ||
exports.uniqueId = uniqueId; |
@@ -22,4 +22,51 @@ var getCopy = function getCopy(dictionary, copy) { | ||
function _objectWithoutPropertiesLoose(source, excluded) { | ||
if (source == null) return {}; | ||
var target = {}; | ||
var sourceKeys = Object.keys(source); | ||
var key, i; | ||
for (i = 0; i < sourceKeys.length; i++) { | ||
key = sourceKeys[i]; | ||
if (excluded.indexOf(key) >= 0) continue; | ||
target[key] = source[key]; | ||
} | ||
return target; | ||
} | ||
var objectWithoutPropertiesLoose = _objectWithoutPropertiesLoose; | ||
function _objectWithoutProperties(source, excluded) { | ||
if (source == null) return {}; | ||
var target = objectWithoutPropertiesLoose(source, excluded); | ||
var key, i; | ||
if (Object.getOwnPropertySymbols) { | ||
var sourceSymbolKeys = Object.getOwnPropertySymbols(source); | ||
for (i = 0; i < sourceSymbolKeys.length; i++) { | ||
key = sourceSymbolKeys[i]; | ||
if (excluded.indexOf(key) >= 0) continue; | ||
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; | ||
target[key] = source[key]; | ||
} | ||
} | ||
return target; | ||
} | ||
var objectWithoutProperties = _objectWithoutProperties; | ||
var safeRest = (function (_ref) { | ||
var style = _ref.style, | ||
className = _ref.className, | ||
as = _ref.as, | ||
props = objectWithoutProperties(_ref, ["style", "className", "as"]); | ||
return props; | ||
}); | ||
/* eslint-disable import/prefer-default-export */ | ||
export { getCopy, uniqueId }; | ||
export { getCopy, safeRest, uniqueId }; |
/* eslint-disable import/prefer-default-export */ | ||
export { default as getCopy } from './getCopy' | ||
export { default as uniqueId } from './uniqueId' | ||
export { default as safeRest } from './safeRest' |
{ | ||
"name": "@tds/util-helpers", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "TDS helpers", | ||
@@ -23,3 +23,3 @@ "main": "index.cjs.js", | ||
"homepage": "http://tds.telus.com", | ||
"gitHead": "7d649cf2c63d7678d4568f6d8e0fae0d6dcc05b1" | ||
"gitHead": "ca52427134b54f4a88cb5a800335ab5aa700c273" | ||
} |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
8340
15
179
0