@instructure/uid
Advanced tools
Comparing version 5.41.1 to 5.41.2-rc.0
@@ -6,2 +6,36 @@ # Change Log | ||
## [5.41.2-rc.0](https://github.com/instructure/instructure-ui/compare/v5.41.1...v5.41.2-rc.0) (2019-02-19) | ||
### Features | ||
* **ui-scripts:** add examples and server scripts ([e229eef](https://github.com/instructure/instructure-ui/commit/e229eef)) | ||
* **ui-scripts,ui-test-utils:** add a --mocha option to ui-test ([bd37e2b](https://github.com/instructure/instructure-ui/commit/bd37e2b)) | ||
### Performance Improvements | ||
* **babel-plugin-themeable-styles:** speed up babel transpile ([2df2a22](https://github.com/instructure/instructure-ui/commit/2df2a22)) | ||
## [5.41.2-rc.0](https://github.com/instructure/instructure-ui/compare/v5.41.1...v5.41.2-rc.0) (2019-02-19) | ||
### Features | ||
* **ui-scripts:** add examples and server scripts ([e229eef](https://github.com/instructure/instructure-ui/commit/e229eef)) | ||
* **ui-scripts,ui-test-utils:** add a --mocha option to ui-test ([bd37e2b](https://github.com/instructure/instructure-ui/commit/bd37e2b)) | ||
### Performance Improvements | ||
* **babel-plugin-themeable-styles:** speed up babel transpile ([2df2a22](https://github.com/instructure/instructure-ui/commit/2df2a22)) | ||
<a name="5.41.1"></a> | ||
@@ -8,0 +42,0 @@ ## [5.41.1](https://github.com/instructure/instructure-ui/compare/v5.41.0...v5.41.1) (2019-01-30) |
@@ -35,3 +35,3 @@ /* | ||
* @param {String} prefix a string to prefix the id for debugging in non-production env | ||
* @param {Number} length id length (in characters) | ||
* @param {Number} length id length (in characters, minus the prefix) | ||
* @returns {String} a unique id | ||
@@ -43,9 +43,8 @@ */ | ||
var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 12; | ||
var id = "u".concat(_uid('', length - 1)); | ||
var id = _uid('', length); | ||
if (prefix && process.env.NODE_ENV !== 'production') { | ||
return "".concat(prefix, "__").concat(id); | ||
} else { | ||
return "uid".concat(id); | ||
return id; | ||
} | ||
@@ -52,0 +51,0 @@ } |
@@ -42,3 +42,3 @@ "use strict"; | ||
* @param {String} prefix a string to prefix the id for debugging in non-production env | ||
* @param {Number} length id length (in characters) | ||
* @param {Number} length id length (in characters, minus the prefix) | ||
* @returns {String} a unique id | ||
@@ -50,9 +50,8 @@ */ | ||
var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 12; | ||
var id = "u".concat(_uid('', length - 1)); | ||
var id = _uid('', length); | ||
if (prefix && process.env.NODE_ENV !== 'production') { | ||
return "".concat(prefix, "__").concat(id); | ||
} else { | ||
return "uid".concat(id); | ||
return id; | ||
} | ||
@@ -59,0 +58,0 @@ } |
{ | ||
"name": "@instructure/uid", | ||
"version": "5.41.1", | ||
"version": "5.41.2-rc.0", | ||
"description": "A unique (CSS-safe) id generator made by Instructure Inc.", | ||
@@ -15,3 +15,3 @@ "author": "Instructure, Inc. Engineering and Product Design", | ||
"scripts": { | ||
"test:node": "ui-test --node", | ||
"test": "ui-test --mocha", | ||
"lint": "ui-test --lint", | ||
@@ -25,4 +25,4 @@ "lint:fix": "ui-test --lint --fix", | ||
"devDependencies": { | ||
"@instructure/ui-babel-preset": "^5", | ||
"@instructure/ui-test-utils": "^5" | ||
"@instructure/ui-babel-preset": "^5.41.2-rc.0", | ||
"@instructure/ui-test-utils": "^5.41.2-rc.0" | ||
}, | ||
@@ -34,3 +34,5 @@ "dependencies": { | ||
"access": "public" | ||
} | ||
}, | ||
"sideEffects": false, | ||
"gitHead": "a9809ce2a2f5444fb3cf1e6093551f0ca5b6f4b2" | ||
} |
@@ -38,11 +38,11 @@ /* | ||
* @param {String} prefix a string to prefix the id for debugging in non-production env | ||
* @param {Number} length id length (in characters) | ||
* @param {Number} length id length (in characters, minus the prefix) | ||
* @returns {String} a unique id | ||
*/ | ||
export default function uid (prefix = '', length = 12) { | ||
const id = _uid('', length) | ||
const id = `u${_uid('', length - 1)}` | ||
if (prefix && process.env.NODE_ENV !== 'production') { | ||
return `${prefix}__${id}` | ||
} else { | ||
return `uid${id}` | ||
return id | ||
} | ||
@@ -49,0 +49,0 @@ } |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
15687
10
0
1