New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@advanced-rest-client/uuid-generator

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@advanced-rest-client/uuid-generator - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

.DS_Store

38

CHANGELOG.md

@@ -51,1 +51,39 @@ <a name="2.0.0"></a>

# [3.0.0](https://github.com/advanced-rest-client/uuid-generator/compare/1.0.4...3.0.0) (2019-06-02)
### Breaking
* Updating component to Polymer 3.0 ([d18964254df17712e3dbfa577bb792bf95e812d6](https://github.com/advanced-rest-client/uuid-generator/commit/d18964254df17712e3dbfa577bb792bf95e812d6))
* Upgrading to LitElement and open-wc ([b5993f391f97aa4dc0df79034dfef090ce68f2de](https://github.com/advanced-rest-client/uuid-generator/commit/b5993f391f97aa4dc0df79034dfef090ce68f2de))
### Fix
* Fixing BS command ([9f8d5c1500499723f66f26c440718d440777fe5b](https://github.com/advanced-rest-client/uuid-generator/commit/9f8d5c1500499723f66f26c440718d440777fe5b))
* Fixing test command after moving to SauceLabs ([4b0a968e5081e636a83a31d1dd29c70ba97eda57](https://github.com/advanced-rest-client/uuid-generator/commit/4b0a968e5081e636a83a31d1dd29c70ba97eda57))
### New
* Adding NPM ignore file ([c798945d6210020f8a1a0b2d09d83bcd5e2208ae](https://github.com/advanced-rest-client/uuid-generator/commit/c798945d6210020f8a1a0b2d09d83bcd5e2208ae))
### Update
* Added new Travis configuration ([5a4c1dc0425be613380ce5f152d05b5b37820594](https://github.com/advanced-rest-client/uuid-generator/commit/5a4c1dc0425be613380ce5f152d05b5b37820594))
* Adding cache directive to travis ([2ac970d43243928174f4413d302d76444f4bf4fb](https://github.com/advanced-rest-client/uuid-generator/commit/2ac970d43243928174f4413d302d76444f4bf4fb))
* Removing `startConnect` ([3ea3f30e7f43e8dedb2cd5ca312b5d3aed54bbff](https://github.com/advanced-rest-client/uuid-generator/commit/3ea3f30e7f43e8dedb2cd5ca312b5d3aed54bbff))
* Removing Username and Password from SL config ([c5231d4f1b8ccf9f221ba76e00cd21250fbe13ac](https://github.com/advanced-rest-client/uuid-generator/commit/c5231d4f1b8ccf9f221ba76e00cd21250fbe13ac))
* Replacing BrowserStack with SauceLabs ([7ea7b3d7580f55e7ec6581743c029032c40f403c](https://github.com/advanced-rest-client/uuid-generator/commit/7ea7b3d7580f55e7ec6581743c029032c40f403c))
* Updating demo page ([e9b355807aede958a721e691b3d7ccdaec7fe0d4](https://github.com/advanced-rest-client/uuid-generator/commit/e9b355807aede958a721e691b3d7ccdaec7fe0d4))
* Updating import paths to match web spec ([444e2a9a1d309fb2572be14fc0e46b482da281a3](https://github.com/advanced-rest-client/uuid-generator/commit/444e2a9a1d309fb2572be14fc0e46b482da281a3))
* Updating karma saucelabs module ([9aa2e73358952745db776a8b46f27d0300e6a742](https://github.com/advanced-rest-client/uuid-generator/commit/9aa2e73358952745db776a8b46f27d0300e6a742))
* Updating tests configuration ([6498d7d026fbfe364e5c8fbb29eb03e59be63f66](https://github.com/advanced-rest-client/uuid-generator/commit/6498d7d026fbfe364e5c8fbb29eb03e59be63f66))
* Updating travis configuration ([c6c94354a7418d5acd7818932cf97741bb38910c](https://github.com/advanced-rest-client/uuid-generator/commit/c6c94354a7418d5acd7818932cf97741bb38910c))
* Upgrading components ([8e46bc6945814d4275e9b98e39903f614103f6f2](https://github.com/advanced-rest-client/uuid-generator/commit/8e46bc6945814d4275e9b98e39903f614103f6f2))
* Upgrading dependencies ([d4239950cc6efff9ce031d10eaf28d379c33fd28](https://github.com/advanced-rest-client/uuid-generator/commit/d4239950cc6efff9ce031d10eaf28d379c33fd28))
### Upodate
* removing old installation files ([8549d26fbc8ec64f0515c75aa84c18b201ea7557](https://github.com/advanced-rest-client/uuid-generator/commit/8549d26fbc8ec64f0515c75aa84c18b201ea7557))

10

package.json

@@ -14,6 +14,6 @@ {

"name": "@advanced-rest-client/uuid-generator",
"version": "3.0.0",
"version": "3.0.1",
"license": "Apache-2.0",
"devDependencies": {
"@advanced-rest-client/arc-demo-helper": "^1.0.1",
"@advanced-rest-client/arc-demo-helper": "^1.0.2",
"@advanced-rest-client/testing-karma-sl": "^1.0.2",

@@ -23,3 +23,2 @@ "@open-wc/testing": "^0.12.5",

"@polymer/gen-typescript-declarations": "^1.6.1",
"@polymer/paper-button": "^3.0.0",
"@webcomponents/webcomponentsjs": "^2.0.0",

@@ -47,6 +46,3 @@ "owc-dev-server": "^0.4.3",

"The Advanced REST client authors <arc@mulesoft.com>"
],
"dependencies": {
"lit-element": "^2.1.0"
}
]
}

@@ -7,3 +7,4 @@ [![Build Status](https://travis-ci.org/advanced-rest-client/authorization-panel.svg?branch=stage)](https://travis-ci.org/advanced-rest-client/uuid-generator)

An UUID generator as a web component.
An UUID generator as a plain web component.
It does not include any dependnecies.

@@ -10,0 +11,0 @@ ### API components

@@ -13,53 +13,5 @@ /**

// tslint:disable:variable-name Describing an API that's defined elsewhere.
// tslint:disable:no-any describes the API as best we are able today
import {LitElement} from 'lit-element';
import {UuidGenerator} from './UuidGenerator.js';
export {UuidGenerator};
declare namespace LogicElements {
/**
* An UUID generator.
*
* ## Example
* ```html
* <uuid-generator auto last-uuid="{{generatedUuid}}"></uuid-generator>
* ```
*/
class UuidGenerator extends LitElement {
auto: boolean|null|undefined;
/**
* Last generated UUID.
*/
lastUuid: string|null|undefined;
_lut: any[]|null|undefined;
constructor();
_genLut(): any;
_autoChanged(state: any): void;
/**
* Creates an UUID string
*
* @returns Generated value
*/
_hash(): String|null;
/**
* Generate a RFC4122, version 4 ID. Example:
* "92329D39-6F5C-4520-ABFC-AAB64544E172"
* http://stackoverflow.com/a/21963136/1127848
*
* @returns The UUID string.
*/
generate(): String|null;
}
}
declare global {
interface HTMLElementTagNameMap {
"uuid-generator": LogicElements.UuidGenerator;
}
}

@@ -14,91 +14,4 @@ /**

*/
import { LitElement } from 'lit-element';
/**
* An UUID generator.
*
* ## Example
* ```html
* <uuid-generator auto last-uuid="{{generatedUuid}}"></uuid-generator>
* ```
* @customElement
* @memberof LogicElements
* @demo demo/index.html
*/
export class UuidGenerator extends LitElement {
static get properties() {
return {
// Last generated UUID.
lastUuid: {type: String},
auto: {type: Boolean, reflect: true},
_lut: {type: Array}
};
}
constructor() {
super();
this._lut = this._genLut();
}
get auto() {
return this._auto;
}
/**
* If set it generates uuid and sets it to `lastUuid` once the element
* is ready.
*
* @param {Boolean} value
*/
set auto(value) {
this._auto = value;
this._autoChanged(value);
}
_genLut() {
const result = [];
for (let i = 0; i < 256; i++) {
result[i] = (i < 16 ? '0' : '') + (i).toString(16);
}
return result;
}
_autoChanged(state) {
if (!state) {
return;
}
this.generate();
}
/**
* Creates an UUID string
* @return {String} Generated value
*/
_hash() {
const d0 = Math.random() * 0xffffffff | 0;
const d1 = Math.random() * 0xffffffff | 0;
const d2 = Math.random() * 0xffffffff | 0;
const d3 = Math.random() * 0xffffffff | 0;
const lut = this._lut;
return lut[d0 & 0xff] + lut[d0 >> 8 & 0xff] + lut[d0 >> 16 & 0xff] +
lut[d0 >> 24 & 0xff] + '-' + lut[d1 & 0xff] + lut[d1 >> 8 & 0xff] + '-' +
lut[d1 >> 16 & 0x0f | 0x40] + lut[d1 >> 24 & 0xff] + '-' + lut[d2 & 0x3f | 0x80] +
lut[d2 >> 8 & 0xff] + '-' + lut[d2 >> 16 & 0xff] + lut[d2 >> 24 & 0xff] +
lut[d3 & 0xff] + lut[d3 >> 8 & 0xff] + lut[d3 >> 16 & 0xff] + lut[d3 >> 24 & 0xff];
}
/**
* Generate a RFC4122, version 4 ID. Example:
* "92329D39-6F5C-4520-ABFC-AAB64544E172"
* http://stackoverflow.com/a/21963136/1127848
* @return {String} The UUID string.
*/
generate() {
const value = this._hash();
this.lastUuid = value;
// Compatibility with Polymer.
this.dispatchEvent(new CustomEvent('last-uuid-changed', {
detail: {
value
}
}));
return this.lastUuid;
}
}
import { UuidGenerator } from './UuidGenerator.js';
export { UuidGenerator };
window.customElements.define('uuid-generator', UuidGenerator);
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