pouchdb-utils
Advanced tools
Comparing version 6.2.0 to 6.2.1-prerelease
@@ -8,2 +8,3 @@ import Promise from 'pouchdb-promise'; | ||
import { BAD_REQUEST, INVALID_ID, MISSING_ID, RESERVED_ID, createError } from 'pouchdb-errors'; | ||
import v4 from 'uuid/v4'; | ||
@@ -712,3 +713,3 @@ function isBinaryObject(object) { | ||
// use the "loose" parser | ||
/* jshint maxlen: false */ | ||
/* eslint maxlen: 0, no-useless-escape: 0 */ | ||
var parser = /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/; | ||
@@ -803,79 +804,8 @@ | ||
// BEGIN Math.uuid.js | ||
/*! | ||
Math.uuid.js (v1.4) | ||
http://www.broofa.com | ||
mailto:robert@broofa.com | ||
Copyright (c) 2010 Robert Kieffer | ||
Dual licensed under the MIT and GPL licenses. | ||
*/ | ||
/* | ||
* Generate a random uuid. | ||
* | ||
* USAGE: Math.uuid(length, radix) | ||
* length - the desired number of characters | ||
* radix - the number of allowable values for each character. | ||
* | ||
* EXAMPLES: | ||
* // No arguments - returns RFC4122, version 4 ID | ||
* >>> Math.uuid() | ||
* "92329D39-6F5C-4520-ABFC-AAB64544E172" | ||
* | ||
* // One argument - returns ID of the specified length | ||
* >>> Math.uuid(15) // 15 character ID (default base=62) | ||
* "VcydxgltxrVZSTV" | ||
* | ||
* // Two arguments - returns ID of the specified length, and radix. | ||
* // (Radix must be <= 62) | ||
* >>> Math.uuid(8, 2) // 8 character ID (base=2) | ||
* "01001010" | ||
* >>> Math.uuid(8, 10) // 8 character ID (base=10) | ||
* "47473046" | ||
* >>> Math.uuid(8, 16) // 8 character ID (base=16) | ||
* "098F4D35" | ||
*/ | ||
var chars = ( | ||
'0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' + | ||
'abcdefghijklmnopqrstuvwxyz' | ||
).split(''); | ||
function getValue(radix) { | ||
return 0 | Math.random() * radix; | ||
function rev() { | ||
return v4().replace(/-/g, '').toLowerCase(); | ||
} | ||
function uuid(len, radix) { | ||
radix = radix || chars.length; | ||
var out = ''; | ||
var i = -1; | ||
if (len) { | ||
// Compact form | ||
while (++i < len) { | ||
out += chars[getValue(radix)]; | ||
} | ||
return out; | ||
} | ||
// rfc4122, version 4 form | ||
// Fill in random data. At i==19 set the high bits of clock sequence as | ||
// per rfc4122, sec. 4.1.5 | ||
while (++i < 36) { | ||
switch (i) { | ||
case 8: | ||
case 13: | ||
case 18: | ||
case 23: | ||
out += '-'; | ||
break; | ||
case 19: | ||
out += chars[(getValue(16) & 0x3) | 0x8]; | ||
break; | ||
default: | ||
out += chars[getValue(16)]; | ||
} | ||
} | ||
var uuid = v4; | ||
return out; | ||
} | ||
export { adapterFun, bulkGet as bulkGetShim, Changes as changesHandler, clone, defaultBackOff, explainError, assign$1 as assign, filterChange, flatten, res$1 as functionName, guardedConsole, hasLocalStorage, invalidIdError, isChromeApp, isCordova, isRemote, listenerCount, immediate as nextTick, normalizeDesignDocFunctionName as normalizeDdocFunctionName, once, parseDesignDocFunctionName as parseDdocFunctionName, parseUri, pick, scopeEval, toPromise, upsert, uuid }; | ||
export { adapterFun, assign$1 as assign, bulkGet as bulkGetShim, Changes as changesHandler, clone, defaultBackOff, explainError, filterChange, flatten, res$1 as functionName, guardedConsole, hasLocalStorage, invalidIdError, isChromeApp, isCordova, isRemote, listenerCount, immediate as nextTick, normalizeDesignDocFunctionName as normalizeDdocFunctionName, once, parseDesignDocFunctionName as parseDdocFunctionName, parseUri, pick, rev, scopeEval, toPromise, upsert, uuid }; |
@@ -14,2 +14,3 @@ 'use strict'; | ||
var pouchdbErrors = require('pouchdb-errors'); | ||
var v4 = _interopDefault(require('uuid/v4')); | ||
@@ -718,3 +719,3 @@ function isBinaryObject(object) { | ||
// use the "loose" parser | ||
/* jshint maxlen: false */ | ||
/* eslint maxlen: 0, no-useless-escape: 0 */ | ||
var parser = /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/; | ||
@@ -809,80 +810,10 @@ | ||
// BEGIN Math.uuid.js | ||
/*! | ||
Math.uuid.js (v1.4) | ||
http://www.broofa.com | ||
mailto:robert@broofa.com | ||
Copyright (c) 2010 Robert Kieffer | ||
Dual licensed under the MIT and GPL licenses. | ||
*/ | ||
/* | ||
* Generate a random uuid. | ||
* | ||
* USAGE: Math.uuid(length, radix) | ||
* length - the desired number of characters | ||
* radix - the number of allowable values for each character. | ||
* | ||
* EXAMPLES: | ||
* // No arguments - returns RFC4122, version 4 ID | ||
* >>> Math.uuid() | ||
* "92329D39-6F5C-4520-ABFC-AAB64544E172" | ||
* | ||
* // One argument - returns ID of the specified length | ||
* >>> Math.uuid(15) // 15 character ID (default base=62) | ||
* "VcydxgltxrVZSTV" | ||
* | ||
* // Two arguments - returns ID of the specified length, and radix. | ||
* // (Radix must be <= 62) | ||
* >>> Math.uuid(8, 2) // 8 character ID (base=2) | ||
* "01001010" | ||
* >>> Math.uuid(8, 10) // 8 character ID (base=10) | ||
* "47473046" | ||
* >>> Math.uuid(8, 16) // 8 character ID (base=16) | ||
* "098F4D35" | ||
*/ | ||
var chars = ( | ||
'0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' + | ||
'abcdefghijklmnopqrstuvwxyz' | ||
).split(''); | ||
function getValue(radix) { | ||
return 0 | Math.random() * radix; | ||
function rev() { | ||
return v4().replace(/-/g, '').toLowerCase(); | ||
} | ||
function uuid(len, radix) { | ||
radix = radix || chars.length; | ||
var out = ''; | ||
var i = -1; | ||
if (len) { | ||
// Compact form | ||
while (++i < len) { | ||
out += chars[getValue(radix)]; | ||
} | ||
return out; | ||
} | ||
// rfc4122, version 4 form | ||
// Fill in random data. At i==19 set the high bits of clock sequence as | ||
// per rfc4122, sec. 4.1.5 | ||
while (++i < 36) { | ||
switch (i) { | ||
case 8: | ||
case 13: | ||
case 18: | ||
case 23: | ||
out += '-'; | ||
break; | ||
case 19: | ||
out += chars[(getValue(16) & 0x3) | 0x8]; | ||
break; | ||
default: | ||
out += chars[getValue(16)]; | ||
} | ||
} | ||
var uuid = v4; | ||
return out; | ||
} | ||
exports.adapterFun = adapterFun; | ||
exports.assign = assign$1; | ||
exports.bulkGetShim = bulkGet; | ||
@@ -893,3 +824,2 @@ exports.changesHandler = Changes; | ||
exports.explainError = explainError; | ||
exports.assign = assign$1; | ||
exports.filterChange = filterChange; | ||
@@ -911,2 +841,3 @@ exports.flatten = flatten; | ||
exports.pick = pick; | ||
exports.rev = rev; | ||
exports.scopeEval = scopeEval; | ||
@@ -913,0 +844,0 @@ exports.toPromise = toPromise; |
@@ -8,2 +8,3 @@ import Promise from 'pouchdb-promise'; | ||
import { BAD_REQUEST, INVALID_ID, MISSING_ID, RESERVED_ID, createError } from 'pouchdb-errors'; | ||
import v4 from 'uuid/v4'; | ||
@@ -661,3 +662,3 @@ function isBinaryObject(object) { | ||
// use the "loose" parser | ||
/* jshint maxlen: false */ | ||
/* eslint maxlen: 0, no-useless-escape: 0 */ | ||
var parser = /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/; | ||
@@ -752,79 +753,8 @@ | ||
// BEGIN Math.uuid.js | ||
/*! | ||
Math.uuid.js (v1.4) | ||
http://www.broofa.com | ||
mailto:robert@broofa.com | ||
Copyright (c) 2010 Robert Kieffer | ||
Dual licensed under the MIT and GPL licenses. | ||
*/ | ||
/* | ||
* Generate a random uuid. | ||
* | ||
* USAGE: Math.uuid(length, radix) | ||
* length - the desired number of characters | ||
* radix - the number of allowable values for each character. | ||
* | ||
* EXAMPLES: | ||
* // No arguments - returns RFC4122, version 4 ID | ||
* >>> Math.uuid() | ||
* "92329D39-6F5C-4520-ABFC-AAB64544E172" | ||
* | ||
* // One argument - returns ID of the specified length | ||
* >>> Math.uuid(15) // 15 character ID (default base=62) | ||
* "VcydxgltxrVZSTV" | ||
* | ||
* // Two arguments - returns ID of the specified length, and radix. | ||
* // (Radix must be <= 62) | ||
* >>> Math.uuid(8, 2) // 8 character ID (base=2) | ||
* "01001010" | ||
* >>> Math.uuid(8, 10) // 8 character ID (base=10) | ||
* "47473046" | ||
* >>> Math.uuid(8, 16) // 8 character ID (base=16) | ||
* "098F4D35" | ||
*/ | ||
var chars = ( | ||
'0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' + | ||
'abcdefghijklmnopqrstuvwxyz' | ||
).split(''); | ||
function getValue(radix) { | ||
return 0 | Math.random() * radix; | ||
function rev() { | ||
return v4().replace(/-/g, '').toLowerCase(); | ||
} | ||
function uuid(len, radix) { | ||
radix = radix || chars.length; | ||
var out = ''; | ||
var i = -1; | ||
if (len) { | ||
// Compact form | ||
while (++i < len) { | ||
out += chars[getValue(radix)]; | ||
} | ||
return out; | ||
} | ||
// rfc4122, version 4 form | ||
// Fill in random data. At i==19 set the high bits of clock sequence as | ||
// per rfc4122, sec. 4.1.5 | ||
while (++i < 36) { | ||
switch (i) { | ||
case 8: | ||
case 13: | ||
case 18: | ||
case 23: | ||
out += '-'; | ||
break; | ||
case 19: | ||
out += chars[(getValue(16) & 0x3) | 0x8]; | ||
break; | ||
default: | ||
out += chars[getValue(16)]; | ||
} | ||
} | ||
var uuid = v4; | ||
return out; | ||
} | ||
export { adapterFun, bulkGet as bulkGetShim, Changes as changesHandler, clone, defaultBackOff, res as explainError, assign$1 as assign, filterChange, flatten, res$3 as functionName, guardedConsole, hasLocalStorage, invalidIdError, isChromeApp, isCordova, isRemote, listenerCount, nextTick, normalizeDesignDocFunctionName as normalizeDdocFunctionName, once, parseDesignDocFunctionName as parseDdocFunctionName, parseUri, pick, scopeEval, toPromise, upsert, uuid }; | ||
export { adapterFun, assign$1 as assign, bulkGet as bulkGetShim, Changes as changesHandler, clone, defaultBackOff, res as explainError, filterChange, flatten, res$3 as functionName, guardedConsole, hasLocalStorage, invalidIdError, isChromeApp, isCordova, isRemote, listenerCount, nextTick, normalizeDesignDocFunctionName as normalizeDdocFunctionName, once, parseDesignDocFunctionName as parseDdocFunctionName, parseUri, pick, rev, scopeEval, toPromise, upsert, uuid }; |
@@ -14,2 +14,3 @@ 'use strict'; | ||
var pouchdbErrors = require('pouchdb-errors'); | ||
var v4 = _interopDefault(require('uuid/v4')); | ||
@@ -667,3 +668,3 @@ function isBinaryObject(object) { | ||
// use the "loose" parser | ||
/* jshint maxlen: false */ | ||
/* eslint maxlen: 0, no-useless-escape: 0 */ | ||
var parser = /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/; | ||
@@ -758,80 +759,10 @@ | ||
// BEGIN Math.uuid.js | ||
/*! | ||
Math.uuid.js (v1.4) | ||
http://www.broofa.com | ||
mailto:robert@broofa.com | ||
Copyright (c) 2010 Robert Kieffer | ||
Dual licensed under the MIT and GPL licenses. | ||
*/ | ||
/* | ||
* Generate a random uuid. | ||
* | ||
* USAGE: Math.uuid(length, radix) | ||
* length - the desired number of characters | ||
* radix - the number of allowable values for each character. | ||
* | ||
* EXAMPLES: | ||
* // No arguments - returns RFC4122, version 4 ID | ||
* >>> Math.uuid() | ||
* "92329D39-6F5C-4520-ABFC-AAB64544E172" | ||
* | ||
* // One argument - returns ID of the specified length | ||
* >>> Math.uuid(15) // 15 character ID (default base=62) | ||
* "VcydxgltxrVZSTV" | ||
* | ||
* // Two arguments - returns ID of the specified length, and radix. | ||
* // (Radix must be <= 62) | ||
* >>> Math.uuid(8, 2) // 8 character ID (base=2) | ||
* "01001010" | ||
* >>> Math.uuid(8, 10) // 8 character ID (base=10) | ||
* "47473046" | ||
* >>> Math.uuid(8, 16) // 8 character ID (base=16) | ||
* "098F4D35" | ||
*/ | ||
var chars = ( | ||
'0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' + | ||
'abcdefghijklmnopqrstuvwxyz' | ||
).split(''); | ||
function getValue(radix) { | ||
return 0 | Math.random() * radix; | ||
function rev() { | ||
return v4().replace(/-/g, '').toLowerCase(); | ||
} | ||
function uuid(len, radix) { | ||
radix = radix || chars.length; | ||
var out = ''; | ||
var i = -1; | ||
if (len) { | ||
// Compact form | ||
while (++i < len) { | ||
out += chars[getValue(radix)]; | ||
} | ||
return out; | ||
} | ||
// rfc4122, version 4 form | ||
// Fill in random data. At i==19 set the high bits of clock sequence as | ||
// per rfc4122, sec. 4.1.5 | ||
while (++i < 36) { | ||
switch (i) { | ||
case 8: | ||
case 13: | ||
case 18: | ||
case 23: | ||
out += '-'; | ||
break; | ||
case 19: | ||
out += chars[(getValue(16) & 0x3) | 0x8]; | ||
break; | ||
default: | ||
out += chars[getValue(16)]; | ||
} | ||
} | ||
var uuid = v4; | ||
return out; | ||
} | ||
exports.adapterFun = adapterFun; | ||
exports.assign = assign$1; | ||
exports.bulkGetShim = bulkGet; | ||
@@ -842,3 +773,2 @@ exports.changesHandler = Changes; | ||
exports.explainError = res; | ||
exports.assign = assign$1; | ||
exports.filterChange = filterChange; | ||
@@ -860,2 +790,3 @@ exports.flatten = flatten; | ||
exports.pick = pick; | ||
exports.rev = rev; | ||
exports.scopeEval = scopeEval; | ||
@@ -862,0 +793,0 @@ exports.toPromise = toPromise; |
{ | ||
"name": "pouchdb-utils", | ||
"version": "6.2.0", | ||
"version": "6.2.1-prerelease", | ||
"description": "Unassorted utilities used by PouchDB.", | ||
@@ -10,21 +10,12 @@ "main": "./lib/index.js", | ||
"repository": "https://github.com/pouchdb/pouchdb", | ||
"jsnext:main": "./lib/index.es.js", | ||
"jsnext:main": "./src/index.js", | ||
"browser": { | ||
"./lib/index.js": "./lib/index-browser.js", | ||
"./lib/index.es.js": "./lib/index-browser.es.js" | ||
}, | ||
"dependencies": { | ||
"argsarray": "0.0.1", | ||
"clone-buffer": "1.0.0", | ||
"immediate": "3.0.6", | ||
"inherits": "2.0.3", | ||
"pouchdb-collections": "6.2.0", | ||
"pouchdb-errors": "6.2.0", | ||
"pouchdb-promise": "6.2.0" | ||
}, | ||
"files": [ | ||
"lib", | ||
"dist", | ||
"tonic-example.js" | ||
] | ||
"./src/cloneBinaryObject.js": "./src/cloneBinaryObject-browser.js", | ||
"./src/env/hasLocalStorage.js": "./src/env/hasLocalStorage-browser.js", | ||
"./src/env/isChromeApp.js": "./src/env/isChromeApp-browser.js", | ||
"./src/explainError.js": "./src/explainError-browser.js", | ||
"./src/isBinaryObject.js": "./src/isBinaryObject-browser.js", | ||
"./src/nextTick.js": "./src/nextTick-browser.js" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
125105
0
44
3606
2
- Removedargsarray@0.0.1
- Removedclone-buffer@1.0.0
- Removedimmediate@3.0.6
- Removedinherits@2.0.3
- Removedpouchdb-collections@6.2.0
- Removedpouchdb-errors@6.2.0
- Removedpouchdb-promise@6.2.0
- Removedargsarray@0.0.1(transitive)
- Removedclone-buffer@1.0.0(transitive)
- Removedimmediate@3.0.6(transitive)
- Removedinherits@2.0.3(transitive)
- Removedlie@3.1.1(transitive)
- Removedpouchdb-collections@6.2.0(transitive)
- Removedpouchdb-errors@6.2.0(transitive)
- Removedpouchdb-promise@6.2.0(transitive)