Socket
Socket
Sign inDemoInstall

@instructure/uid

Package Overview
Dependencies
Maintainers
33
Versions
1537
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@instructure/uid - npm Package Compare versions

Comparing version 5.41.2-rc.7 to 5.42.0-jstern

LICENSE

31

CHANGELOG.md

@@ -6,11 +6,36 @@ # Change Log

<a name="5.41.2-rc.7"></a>
## [5.41.2-rc.7](https://github.com/instructure/instructure-ui/compare/v5.41.0...v5.41.2-rc.7) (2019-01-31)
# [5.42.0-jstern](https://github.com/instructure/instructure-ui/compare/v5.41.1...v5.42.0-jstern) (2019-02-15)
**Note:** Version bump only for package @instructure/uid
### 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.42.0-jstern](https://github.com/instructure/instructure-ui/compare/v5.41.1...v5.42.0-jstern) (2019-02-15)
### 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>

@@ -17,0 +42,0 @@ ## [5.41.1](https://github.com/instructure/instructure-ui/compare/v5.41.0...v5.41.1) (2019-01-30)

7

es/uid.js

@@ -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.2-rc.7",
"version": "5.42.0-jstern",
"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.41.2-rc.7",
"@instructure/ui-test-utils": "^5.41.2-rc.7"
"@instructure/ui-babel-preset": "^5.42.0-jstern",
"@instructure/ui-test-utils": "^5.42.0-jstern"
},

@@ -35,3 +35,4 @@ "dependencies": {

},
"gitHead": "d6735a4eb35563987154a8fb43642fcd77844367"
"sideEffects": false,
"gitHead": "838337d40b1a99482e0f2cb7cdd3699e2ee7d4ca"
}

@@ -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 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc