@instructure/uid
Advanced tools
Comparing version 5.41.0-rc.12 to 5.41.0-rc.13
@@ -6,4 +6,4 @@ # Change Log | ||
<a name="5.41.0-rc.12"></a> | ||
# [5.41.0-rc.12](https://github.com/instructure/instructure-ui/compare/v5.40.0...v5.41.0-rc.12) (2019-01-22) | ||
<a name="5.41.0-rc.13"></a> | ||
# [5.41.0-rc.13](https://github.com/instructure/instructure-ui/compare/v5.40.0...v5.41.0-rc.13) (2019-01-25) | ||
@@ -10,0 +10,0 @@ **Note:** Version bump only for package @instructure/uid |
@@ -24,8 +24,5 @@ /* | ||
*/ | ||
// based on: https://github.com/ai/nanoid/blob/master/non-secure.js | ||
var dictionary = 'getRandomVcryp0123456789bfhijklqsuvwxzABCDEFGHIJKLMNOPQSTUWXYZ'; | ||
var dictionaryLengthMinus1 = dictionary.length - 1; | ||
/** | ||
@@ -42,2 +39,3 @@ * --- | ||
*/ | ||
export default function uid() { | ||
@@ -48,6 +46,7 @@ var prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; | ||
var id = _uid('', length); | ||
if (prefix && process.env.NODE_ENV !== 'production') { | ||
return prefix + '__' + id; | ||
return "".concat(prefix, "__").concat(id); | ||
} else { | ||
return 'uid' + id; | ||
return "uid".concat(id); | ||
} | ||
@@ -58,2 +57,3 @@ } | ||
var result = []; | ||
while (0 < size--) { | ||
@@ -63,2 +63,3 @@ /* eslint-disable-line no-param-reassign */ | ||
} | ||
return result; | ||
@@ -69,5 +70,6 @@ } | ||
var idLength = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 12; | ||
var id = ''; | ||
var id = ''; | ||
var bytes = _random(idLength); | ||
while (0 < idLength--) { | ||
@@ -77,3 +79,4 @@ /* eslint-disable-line no-param-reassign */ | ||
} | ||
return id; | ||
} |
@@ -1,36 +0,15 @@ | ||
'use strict'; | ||
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = undefined; | ||
Object.defineProperty(exports, "default", { | ||
enumerable: true, | ||
get: function get() { | ||
return _uid.default; | ||
} | ||
}); | ||
var _uid = require('./uid'); | ||
var _uid2 = _interopRequireDefault(_uid); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
exports.default = _uid2.default; /* | ||
* The MIT License (MIT) | ||
* | ||
* Copyright (c) 2015 - present Instructure, Inc. | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in all | ||
* copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
* SOFTWARE. | ||
*/ | ||
var _uid = _interopRequireDefault(require("./uid")); |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
@@ -7,2 +7,3 @@ Object.defineProperty(exports, "__esModule", { | ||
exports.default = uid; | ||
/* | ||
@@ -31,8 +32,5 @@ * The MIT License (MIT) | ||
*/ | ||
// based on: https://github.com/ai/nanoid/blob/master/non-secure.js | ||
var dictionary = 'getRandomVcryp0123456789bfhijklqsuvwxzABCDEFGHIJKLMNOPQSTUWXYZ'; | ||
var dictionaryLengthMinus1 = dictionary.length - 1; | ||
/** | ||
@@ -49,2 +47,3 @@ * --- | ||
*/ | ||
function uid() { | ||
@@ -55,6 +54,7 @@ var prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; | ||
var id = _uid('', length); | ||
if (prefix && process.env.NODE_ENV !== 'production') { | ||
return prefix + '__' + id; | ||
return "".concat(prefix, "__").concat(id); | ||
} else { | ||
return 'uid' + id; | ||
return "uid".concat(id); | ||
} | ||
@@ -65,2 +65,3 @@ } | ||
var result = []; | ||
while (0 < size--) { | ||
@@ -70,2 +71,3 @@ /* eslint-disable-line no-param-reassign */ | ||
} | ||
return result; | ||
@@ -76,5 +78,6 @@ } | ||
var idLength = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 12; | ||
var id = ''; | ||
var id = ''; | ||
var bytes = _random(idLength); | ||
while (0 < idLength--) { | ||
@@ -84,3 +87,4 @@ /* eslint-disable-line no-param-reassign */ | ||
} | ||
return id; | ||
} |
{ | ||
"name": "@instructure/uid", | ||
"version": "5.41.0-rc.12", | ||
"version": "5.41.0-rc.13", | ||
"description": "A unique (CSS-safe) id generator made by Instructure Inc.", | ||
@@ -24,9 +24,12 @@ "author": "Instructure, Inc. Engineering and Product Design", | ||
"devDependencies": { | ||
"@instructure/ui-babel-preset": "^5.41.0-rc.12", | ||
"@instructure/ui-test-utils": "^5.41.0-rc.12" | ||
"@instructure/ui-babel-preset": "^5.41.0-rc.13", | ||
"@instructure/ui-test-utils": "^5.41.0-rc.13" | ||
}, | ||
"dependencies": { | ||
"@babel/runtime": "^7" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"gitHead": "ef0a38f7dfea9d40129ce30dd68c99ce06d15fc6" | ||
"gitHead": "f8637e1c8ec55c1ec6d55dbbb30e143137a0c310" | ||
} |
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
13245
1
252
+ Added@babel/runtime@^7
+ Added@babel/runtime@7.25.6(transitive)
+ Addedregenerator-runtime@0.14.1(transitive)