uuid-encoder
Advanced tools
Comparing version 1.1.0 to 1.2.0
const bigInt = require('big-integer'); | ||
const knownBases = { | ||
base64url: '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_', | ||
base64: '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+/', | ||
@@ -16,2 +17,4 @@ base62: '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz', | ||
const caseSensitiveBases = { | ||
base64url: true, | ||
base64: true, | ||
base62: true, | ||
@@ -46,3 +49,2 @@ base58: true, | ||
this.base = this.encStr.length; | ||
} | ||
@@ -57,4 +59,4 @@ | ||
static resolveEncodingStr(baseEncodingStr) { | ||
return Object.prototype.hasOwnProperty.call(knownBases, baseEncodingStr) ? | ||
knownBases[baseEncodingStr] : baseEncodingStr; | ||
return Object.prototype.hasOwnProperty.call(knownBases, baseEncodingStr) | ||
? knownBases[baseEncodingStr] : baseEncodingStr; | ||
} | ||
@@ -68,4 +70,4 @@ | ||
static isCaseSensitiveBase(baseEncodingStr) { | ||
return Object.prototype.hasOwnProperty.call(caseSensitiveBases, baseEncodingStr) ? | ||
caseSensitiveBases[baseEncodingStr] : true; | ||
return Object.prototype.hasOwnProperty.call(caseSensitiveBases, baseEncodingStr) | ||
? caseSensitiveBases[baseEncodingStr] : true; | ||
} | ||
@@ -72,0 +74,0 @@ |
@@ -0,0 +0,0 @@ Copyright 2017 Aleksi Asikainen |
{ | ||
"name": "uuid-encoder", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "Encode UUIDs into Base36 or any other system", | ||
@@ -11,3 +11,3 @@ "main": "lib/index.js", | ||
"type": "git", | ||
"url": "git+https://github.com/franksrevenge/uuid-encoder.git" | ||
"url": "git+https://github.com/salieri/uuid-encoder.git" | ||
}, | ||
@@ -33,21 +33,21 @@ "keywords": [ | ||
"bugs": { | ||
"url": "https://github.com/franksrevenge/uuid-encoder/issues" | ||
"url": "https://github.com/salieri/uuid-encoder/issues" | ||
}, | ||
"homepage": "https://github.com/franksrevenge/uuid-encoder#readme", | ||
"homepage": "https://github.com/salieri/uuid-encoder#readme", | ||
"dependencies": { | ||
"big-integer": "^1.6.26" | ||
"big-integer": "^1.6.46" | ||
}, | ||
"devDependencies": { | ||
"chai": "^4.1.2", | ||
"coveralls": "^3.0.0", | ||
"eslint": "^4.9.0", | ||
"eslint-config-airbnb-base": "^12.1.0", | ||
"eslint-plugin-import": "^2.7.0", | ||
"chai": "^4.2.0", | ||
"coveralls": "^3.0.6", | ||
"eslint": "^6.5.1", | ||
"eslint-config-airbnb-base": "^14.0.0", | ||
"eslint-plugin-import": "^2.18.2", | ||
"istanbul": "^0.4.5", | ||
"lodash": "^4.17.4", | ||
"mocha": "^4.0.1", | ||
"lodash": "^4.17.15", | ||
"mocha": "^6.2.1", | ||
"mocha-istanbul": "^0.3.0", | ||
"mocha-lcov-reporter": "^1.3.0", | ||
"should": "^13.1.3" | ||
"should": "^13.2.3" | ||
} | ||
} |
@@ -5,3 +5,3 @@ # UUID Encoder | ||
[![Build Status](https://travis-ci.org/franksrevenge/uuid-encoder.svg?branch=master)](https://travis-ci.org/franksrevenge/uuid-encoder) [![Coverage Status](https://coveralls.io/repos/github/franksrevenge/uuid-encoder/badge.svg?branch=master)](https://coveralls.io/github/franksrevenge/uuid-encoder?branch=master) [![Dependency Status](https://david-dm.org/franksrevenge/uuid-encoder/status.svg)](https://david-dm.org/franksrevenge/uuid-encoder#info=dependencies&view=table) [![Dev Dependency Status](https://david-dm.org/franksrevenge/uuid-encoder/dev-status.svg)](https://david-dm.org/franksrevenge/uuid-encoder#info=devDependencies&view=table) | ||
[![Build Status](https://travis-ci.org/salieri/uuid-encoder.svg?branch=master)](https://travis-ci.org/salieri/uuid-encoder) [![Coverage Status](https://coveralls.io/repos/github/salieri/uuid-encoder/badge.svg?branch=master)](https://coveralls.io/github/salieri/uuid-encoder?branch=master) [![Dependency Status](https://david-dm.org/salieri/uuid-encoder/status.svg)](https://david-dm.org/salieri/uuid-encoder#info=dependencies&view=table) [![Dev Dependency Status](https://david-dm.org/salieri/uuid-encoder/dev-status.svg)](https://david-dm.org/salieri/uuid-encoder#info=devDependencies&view=table) | ||
@@ -54,2 +54,3 @@ | ||
| `'base64'` | 0-9, A-Z, a-z, +, / | Base 64 | | ||
| `'base64url'` | 0-9, A-Z, a-z, -, _ | Base 64 URL encoding (RFC 4648) | | ||
@@ -56,0 +57,0 @@ |
7620
105
67
Updatedbig-integer@^1.6.46