uuid-tool
Advanced tools
Comparing version 1.4.0 to 1.5.0
@@ -1,14 +0,1 @@ | ||
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r=e();for(var n in r)("object"==typeof exports?exports:t)[n]=r[n]}}(this,function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=0)}([function(t,e,r){"use strict";r.r(e); | ||
/** | ||
* UUID | ||
* @author Dominik Geng | ||
* @copyright 2018 Dominik Geng | ||
* @license Apache-2.0 | ||
*/ | ||
var n=function(){function t(t){this.value="","string"==typeof t?this.fromString(t):Array.isArray(t)?this.fromBytes(t):this.generate()}return t.prototype.generate=function(){var t=new Array(16).fill(0).map(function(){return 255*Math.random()&255});return t[6]=79&(64|t[6]),this.fromBytes(t),this},t.prototype.fromBytes=function(t){return this.value=t.map(function(t){return("00"+t.toString(16)).slice(-2)}).join("").replace(/(.{8})(.{4})(.{4})(.{4})(.{12})/,"$1-$2-$3-$4-$5").toUpperCase(),this},t.prototype.toBytes=function(){return(this.value.replace(/-/g,"").match(/.{2}/g)||[]).map(function(t){return parseInt(t,16)})},t.prototype.fromString=function(t){return this.value=t.trim(),this},t.prototype.toString=function(){switch(t.stringExportFormat){default:case"uppercase":return this.value.toUpperCase();case"lowercase":return this.value.toLowerCase()}},t.prototype.isValid=function(){return"string"==typeof this.value&&36===this.value.length&&t.REGEX.UUID.test(this.value)},t.prototype.equals=function(e){return"string"==typeof e&&(e=new t(e)),this.toString()===e.toString()},t.stringExportFormat="uppercase",t.REGEX={UUID:/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i},t}(),o=function(){function t(){}return t.toBytes=function(t){return(new n).fromString(t).toBytes()},t.toString=function(t){return(new n).fromBytes(t).toString()},t.newUUID=function(){return(new n).toString()},t.isUUID=function(t){return(new n).fromString(t).isValid()},t.compare=function(t,e){return new n(t).equals(new n(e))},t}(); | ||
/** | ||
* UUID Tool | ||
* @author Dominik Geng | ||
* @copyright 2018 Dominik Geng | ||
* @license Apache-2.0 | ||
*/r.d(e,"UUIDTool",function(){return o}),r.d(e,"UUID",function(){return n})}])}); | ||
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r=e();for(var n in r)("object"==typeof exports?exports:t)[n]=r[n]}}(this,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=0)}([function(t,e,r){"use strict";r.r(e),r.d(e,"UUIDTool",(function(){return o})),r.d(e,"UUID",(function(){return n}));var n=function(){function t(t){this.value="","string"==typeof t?this.fromString(t):Array.isArray(t)?this.fromBytes(t):this.generate()}return t.prototype.generate=function(){var t=new Array(16).fill(0).map((function(){return 255*Math.random()&255}));return t[6]=79&(64|t[6]),this.fromBytes(t),this},t.prototype.fromBytes=function(t){return this.value=t.map((function(t){return("00"+t.toString(16)).slice(-2)})).join("").replace(/(.{8})(.{4})(.{4})(.{4})(.{12})/,"$1-$2-$3-$4-$5").toUpperCase(),this},t.prototype.toBytes=function(){return(this.value.replace(/-/g,"").match(/.{2}/g)||[]).map((function(t){return parseInt(t,16)}))},t.prototype.fromString=function(t){return this.value=t.trim(),this},t.prototype.toString=function(){switch(t.stringExportFormat){default:case"uppercase":return this.value.toUpperCase();case"lowercase":return this.value.toLowerCase()}},t.prototype.isValid=function(){return"string"==typeof this.value&&36===this.value.length&&t.REGEX.UUID.test(this.value)},t.prototype.equals=function(e){return"string"==typeof e&&(e=new t(e)),this.toString()===e.toString()},t.stringExportFormat="uppercase",t.REGEX={UUID:/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i},t}(),o=function(){function t(){}return t.toBytes=function(t){return(new n).fromString(t).toBytes()},t.toString=function(t){return(new n).fromBytes(t).toString()},t.newUUID=function(){return(new n).toString()},t.isUUID=function(t){return(new n).fromString(t).isValid()},t.compare=function(t,e){return new n(t).equals(new n(e))},t}()}])})); |
{ | ||
"name": "uuid-tool", | ||
"version": "1.4.0", | ||
"version": "1.5.0", | ||
"description": "Lightweight UUID for JavaScript. Parse and generate UUIDs. Convert between string and byte array.", | ||
@@ -13,13 +13,22 @@ "keywords": [ | ||
"node", | ||
"browser" | ||
"browser", | ||
"guid" | ||
], | ||
"author": "Dominik-Andreas Geng", | ||
"license": "Apache-2.0", | ||
"author": { | ||
"name": "Dominik-Andreas Geng", | ||
"url": "https://github.com/domske/" | ||
}, | ||
"license": "MIT", | ||
"main": "dist/index.js", | ||
"types": "dist/types/index.d.ts", | ||
"types": "dist/index.d.ts", | ||
"files": [ | ||
"dist" | ||
], | ||
"scripts": { | ||
"build": "webpack", | ||
"format": "prettier --write \"src/**/*.ts\" \"src/**/*.js\"", | ||
"lint": "tslint -p tsconfig.json", | ||
"test": "jest --config jestconfig.json", | ||
"lint": "eslint ./src --ext .js,.jsx,.ts,.tsx", | ||
"lint-fix": "eslint ./src --ext .js,.jsx,.ts,.tsx --fix", | ||
"test": "jest", | ||
"coverage": "jest --coverage", | ||
"format": "prettier --write \"src/**/*.ts\"", | ||
"prepare": "npm run build", | ||
@@ -37,14 +46,15 @@ "prepublishOnly": "npm test && npm run lint", | ||
"devDependencies": { | ||
"@types/jest": "^23.3.10", | ||
"clean-webpack-plugin": "^0.1.19", | ||
"jest": "^23.5.0", | ||
"prettier": "^1.15.3", | ||
"ts-jest": "^23.10.5", | ||
"ts-loader": "^4.4.2", | ||
"tslint": "^5.11.0", | ||
"tslint-config-prettier": "^1.17.0", | ||
"typescript": "^3.2.2", | ||
"webpack": "^4.27.1", | ||
"webpack-cli": "^3.1.2" | ||
"@types/jest": "^25.2.1", | ||
"@typescript-eslint/eslint-plugin": "^2.31.0", | ||
"@typescript-eslint/parser": "^2.31.0", | ||
"clean-webpack-plugin": "^3.0.0", | ||
"eslint": "^7.0.0", | ||
"jest": "^26.0.1", | ||
"prettier": "^2.0.5", | ||
"ts-jest": "^25.5.1", | ||
"ts-loader": "^7.0.3", | ||
"typescript": "^3.8.3", | ||
"webpack": "^4.43.0", | ||
"webpack-cli": "^3.3.11" | ||
} | ||
} |
# UUID Tool | ||
[![Version][version]][package] [![MIT License][license-badge]][license] | ||
Lightweight UUID library for JavaScript. | ||
No bullshit, simple to use, easy to learn. | ||
Well tested and no dependencies. | ||
@@ -201,4 +204,9 @@ Parse and generate UUIDs. Convert between UUID string (36 byte) to 16 byte array. | ||
**Apache-2.0** | ||
**[MIT](LICENSE)** © Copyright 2020 Dominik-Andreas Geng ([@domske](https://github.com/domske)) | ||
(C) Copyright 2018 Dominik-Andreas Geng | ||
<!-- badges (common) --> | ||
[license-badge]: https://img.shields.io/npm/l/uuid-tool.svg?style=flat-square | ||
[license]: https://opensource.org/licenses/MIT | ||
[version]: https://img.shields.io/npm/v/uuid-tool.svg?style=flat-square | ||
[package]: https://www.npmjs.com/package/uuid-tool |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
SPDX disjunction
LicenseSPDX disjunction for an artifact's license information
Found 1 instance in 1 package
SPDX disjunction
LicenseSPDX disjunction for an artifact's license information
Found 1 instance in 1 package
8
212
12888
12
79
1