Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@instructure/uid

Package Overview
Dependencies
Maintainers
33
Versions
1591
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.1 to 5.41.2-rc.0

LICENSE

34

CHANGELOG.md

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

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

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