@tds/util-prop-types
Advanced tools
Comparing version 1.3.0 to 1.3.1
@@ -6,2 +6,13 @@ # Change Log | ||
## [1.3.1](https://github.com/telusdigital/tds/compare/@tds/util-prop-types@1.3.0...@tds/util-prop-types@1.3.1) (2019-04-04) | ||
### Bug Fixes | ||
* **util-prop-types:** align prop-types version with rest of repo ([6db7feb](https://github.com/telusdigital/tds/commit/6db7feb)) | ||
# [1.3.0](https://github.com/telusdigital/tds/compare/@tds/util-prop-types@1.2.1...@tds/util-prop-types@1.3.0) (2019-03-28) | ||
@@ -8,0 +19,0 @@ |
@@ -10,10 +10,17 @@ 'use strict'; | ||
function createCommonjsModule(fn, module) { | ||
return module = { exports: {} }, fn(module, module.exports), module.exports; | ||
} | ||
var _typeof_1 = createCommonjsModule(function (module) { | ||
function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); } | ||
function _typeof(obj) { | ||
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { | ||
_typeof = function (obj) { | ||
return typeof obj; | ||
if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") { | ||
module.exports = _typeof = function _typeof(obj) { | ||
return _typeof2(obj); | ||
}; | ||
} else { | ||
_typeof = function (obj) { | ||
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; | ||
module.exports = _typeof = function _typeof(obj) { | ||
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj); | ||
}; | ||
@@ -25,22 +32,5 @@ } | ||
function _toConsumableArray(arr) { | ||
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); | ||
} | ||
module.exports = _typeof; | ||
}); | ||
function _arrayWithoutHoles(arr) { | ||
if (Array.isArray(arr)) { | ||
for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; | ||
return arr2; | ||
} | ||
} | ||
function _iterableToArray(iter) { | ||
if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); | ||
} | ||
function _nonIterableSpread() { | ||
throw new TypeError("Invalid attempt to spread non-iterable instance"); | ||
} | ||
var componentWithName = function componentWithName(passedName, checkDisplayName) { | ||
@@ -65,3 +55,3 @@ if (typeof passedName !== 'string') { | ||
var testNameInObject = function testNameInObject() { | ||
return _typeof(props[propName]) === 'object' && (!checkDisplayName && props[propName].type.name !== passedName || checkDisplayName && props[propName].type.displayName !== passedName); | ||
return _typeof_1(props[propName]) === 'object' && (!checkDisplayName && props[propName].type.name !== passedName || checkDisplayName && props[propName].type.displayName !== passedName); | ||
}; | ||
@@ -73,3 +63,3 @@ | ||
if (_typeof(props[propName]) !== 'object' && typeof props[propName] !== 'function' || testNameInObject() || testNameInFunction()) { | ||
if (_typeof_1(props[propName]) !== 'object' && typeof props[propName] !== 'function' || testNameInObject() || testNameInFunction()) { | ||
return new Error("".concat(componentName, ": Component passed to `").concat(propName, "` prop should be ").concat(passedName)); | ||
@@ -126,2 +116,32 @@ } | ||
function _arrayWithoutHoles(arr) { | ||
if (Array.isArray(arr)) { | ||
for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { | ||
arr2[i] = arr[i]; | ||
} | ||
return arr2; | ||
} | ||
} | ||
var arrayWithoutHoles = _arrayWithoutHoles; | ||
function _iterableToArray(iter) { | ||
if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); | ||
} | ||
var iterableToArray = _iterableToArray; | ||
function _nonIterableSpread() { | ||
throw new TypeError("Invalid attempt to spread non-iterable instance"); | ||
} | ||
var nonIterableSpread = _nonIterableSpread; | ||
function _toConsumableArray(arr) { | ||
return arrayWithoutHoles(arr) || iterableToArray(arr) || nonIterableSpread(); | ||
} | ||
var toConsumableArray = _toConsumableArray; | ||
var createValidator = function createValidator(validators) { | ||
@@ -184,7 +204,7 @@ var validator = function validator(props, propName, componentName) { | ||
return createValidator([PropTypes.arrayOf(createValidator(validators))].concat(_toConsumableArray(validators))); | ||
return createValidator([PropTypes.arrayOf(createValidator(validators))].concat(toConsumableArray(validators))); | ||
}; | ||
exports.componentWithName = componentWithName; | ||
exports.or = or; | ||
exports.responsiveProps = responsiveProps; | ||
exports.or = or; |
import PropTypes, { arrayOf } from 'prop-types'; | ||
function createCommonjsModule(fn, module) { | ||
return module = { exports: {} }, fn(module, module.exports), module.exports; | ||
} | ||
var _typeof_1 = createCommonjsModule(function (module) { | ||
function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); } | ||
function _typeof(obj) { | ||
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { | ||
_typeof = function (obj) { | ||
return typeof obj; | ||
if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") { | ||
module.exports = _typeof = function _typeof(obj) { | ||
return _typeof2(obj); | ||
}; | ||
} else { | ||
_typeof = function (obj) { | ||
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; | ||
module.exports = _typeof = function _typeof(obj) { | ||
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj); | ||
}; | ||
@@ -17,22 +24,5 @@ } | ||
function _toConsumableArray(arr) { | ||
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); | ||
} | ||
module.exports = _typeof; | ||
}); | ||
function _arrayWithoutHoles(arr) { | ||
if (Array.isArray(arr)) { | ||
for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; | ||
return arr2; | ||
} | ||
} | ||
function _iterableToArray(iter) { | ||
if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); | ||
} | ||
function _nonIterableSpread() { | ||
throw new TypeError("Invalid attempt to spread non-iterable instance"); | ||
} | ||
var componentWithName = function componentWithName(passedName, checkDisplayName) { | ||
@@ -57,3 +47,3 @@ if (typeof passedName !== 'string') { | ||
var testNameInObject = function testNameInObject() { | ||
return _typeof(props[propName]) === 'object' && (!checkDisplayName && props[propName].type.name !== passedName || checkDisplayName && props[propName].type.displayName !== passedName); | ||
return _typeof_1(props[propName]) === 'object' && (!checkDisplayName && props[propName].type.name !== passedName || checkDisplayName && props[propName].type.displayName !== passedName); | ||
}; | ||
@@ -65,3 +55,3 @@ | ||
if (_typeof(props[propName]) !== 'object' && typeof props[propName] !== 'function' || testNameInObject() || testNameInFunction()) { | ||
if (_typeof_1(props[propName]) !== 'object' && typeof props[propName] !== 'function' || testNameInObject() || testNameInFunction()) { | ||
return new Error("".concat(componentName, ": Component passed to `").concat(propName, "` prop should be ").concat(passedName)); | ||
@@ -118,2 +108,32 @@ } | ||
function _arrayWithoutHoles(arr) { | ||
if (Array.isArray(arr)) { | ||
for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { | ||
arr2[i] = arr[i]; | ||
} | ||
return arr2; | ||
} | ||
} | ||
var arrayWithoutHoles = _arrayWithoutHoles; | ||
function _iterableToArray(iter) { | ||
if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); | ||
} | ||
var iterableToArray = _iterableToArray; | ||
function _nonIterableSpread() { | ||
throw new TypeError("Invalid attempt to spread non-iterable instance"); | ||
} | ||
var nonIterableSpread = _nonIterableSpread; | ||
function _toConsumableArray(arr) { | ||
return arrayWithoutHoles(arr) || iterableToArray(arr) || nonIterableSpread(); | ||
} | ||
var toConsumableArray = _toConsumableArray; | ||
var createValidator = function createValidator(validators) { | ||
@@ -176,5 +196,5 @@ var validator = function validator(props, propName, componentName) { | ||
return createValidator([arrayOf(createValidator(validators))].concat(_toConsumableArray(validators))); | ||
return createValidator([arrayOf(createValidator(validators))].concat(toConsumableArray(validators))); | ||
}; | ||
export { componentWithName, responsiveProps, or }; | ||
export { componentWithName, or, responsiveProps }; |
{ | ||
"name": "@tds/util-prop-types", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "TDS proptypes", | ||
@@ -24,5 +24,5 @@ "main": "dist/index.cjs.js", | ||
"dependencies": { | ||
"prop-types": "^15.6.2" | ||
"prop-types": "^15.5.10" | ||
}, | ||
"gitHead": "75271399f62033f94090e64280329ed148b6ee2f" | ||
"gitHead": "c85aa2c9d73e00cc36f7afadcfd7e97ef8e47df8" | ||
} |
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
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
41259
880
1
Updatedprop-types@^15.5.10