pouchdb-utils
Advanced tools
Comparing version 6.1.0 to 6.1.1
@@ -521,50 +521,31 @@ 'use strict'; | ||
function extendInner(obj, otherObj) { | ||
for (var key in otherObj) { | ||
if (otherObj.hasOwnProperty(key)) { | ||
var value = clone(otherObj[key]); | ||
if (typeof value !== 'undefined') { | ||
obj[key] = value; | ||
} | ||
} | ||
} | ||
} | ||
var assign; | ||
{ | ||
if (typeof Object.assign === 'function') { | ||
assign = Object.assign; | ||
} else { | ||
// lite Object.assign polyfill based on | ||
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign | ||
assign = function (target) { | ||
var to = Object(target); | ||
function extend(obj, obj2, obj3) { | ||
extendInner(obj, obj2); | ||
if (obj3) { | ||
extendInner(obj, obj3); | ||
} | ||
return obj; | ||
} | ||
for (var index = 1; index < arguments.length; index++) { | ||
var nextSource = arguments[index]; | ||
// forked from | ||
// https://github.com/vmattos/js-extend/blob/7023fd69a9e9552688086b8b8006b1fcf916a306/extend.js | ||
// TODO: I don't know why we have two different extend() functions in PouchDB | ||
var slice = Array.prototype.slice; | ||
var each = Array.prototype.forEach; | ||
function extend$1(obj) { | ||
if (typeof obj !== 'object') { | ||
throw obj + ' is not an object' ; | ||
} | ||
var sources = slice.call(arguments, 1); | ||
each.call(sources, function (source) { | ||
if (source) { | ||
for (var prop in source) { | ||
if (typeof source[prop] === 'object' && obj[prop]) { | ||
extend$1.call(obj, obj[prop], source[prop]); | ||
} else { | ||
obj[prop] = source[prop]; | ||
if (nextSource != null) { // Skip over if undefined or null | ||
for (var nextKey in nextSource) { | ||
// Avoid bugs when hasOwnProperty is shadowed | ||
if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) { | ||
to[nextKey] = nextSource[nextKey]; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}); | ||
return obj; | ||
return to; | ||
}; | ||
} | ||
} | ||
var assign$1 = assign; | ||
function tryFilter(filter, doc, req) { | ||
@@ -644,3 +625,3 @@ try { | ||
var functionName = res; | ||
var res$1 = res; | ||
@@ -873,7 +854,6 @@ // Determine id an ID is valid | ||
exports.explainError = explainError; | ||
exports.extend = extend; | ||
exports.jsExtend = extend$1; | ||
exports.assign = assign$1; | ||
exports.filterChange = filterChange; | ||
exports.flatten = flatten; | ||
exports.functionName = functionName; | ||
exports.functionName = res$1; | ||
exports.guardedConsole = guardedConsole; | ||
@@ -893,2 +873,2 @@ exports.hasLocalStorage = hasLocalStorage; | ||
exports.upsert = upsert; | ||
exports.uuid = uuid; | ||
exports.uuid = uuid; |
@@ -478,50 +478,31 @@ 'use strict'; | ||
function extendInner(obj, otherObj) { | ||
for (var key in otherObj) { | ||
if (otherObj.hasOwnProperty(key)) { | ||
var value = clone(otherObj[key]); | ||
if (typeof value !== 'undefined') { | ||
obj[key] = value; | ||
} | ||
} | ||
} | ||
} | ||
var assign; | ||
{ | ||
if (typeof Object.assign === 'function') { | ||
assign = Object.assign; | ||
} else { | ||
// lite Object.assign polyfill based on | ||
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign | ||
assign = function (target) { | ||
var to = Object(target); | ||
function extend(obj, obj2, obj3) { | ||
extendInner(obj, obj2); | ||
if (obj3) { | ||
extendInner(obj, obj3); | ||
} | ||
return obj; | ||
} | ||
for (var index = 1; index < arguments.length; index++) { | ||
var nextSource = arguments[index]; | ||
// forked from | ||
// https://github.com/vmattos/js-extend/blob/7023fd69a9e9552688086b8b8006b1fcf916a306/extend.js | ||
// TODO: I don't know why we have two different extend() functions in PouchDB | ||
var slice = Array.prototype.slice; | ||
var each = Array.prototype.forEach; | ||
function extend$1(obj) { | ||
if (typeof obj !== 'object') { | ||
throw obj + ' is not an object' ; | ||
} | ||
var sources = slice.call(arguments, 1); | ||
each.call(sources, function (source) { | ||
if (source) { | ||
for (var prop in source) { | ||
if (typeof source[prop] === 'object' && obj[prop]) { | ||
extend$1.call(obj, obj[prop], source[prop]); | ||
} else { | ||
obj[prop] = source[prop]; | ||
if (nextSource != null) { // Skip over if undefined or null | ||
for (var nextKey in nextSource) { | ||
// Avoid bugs when hasOwnProperty is shadowed | ||
if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) { | ||
to[nextKey] = nextSource[nextKey]; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}); | ||
return obj; | ||
return to; | ||
}; | ||
} | ||
} | ||
var assign$1 = assign; | ||
function tryFilter(filter, doc, req) { | ||
@@ -587,3 +568,3 @@ try { | ||
var hasName = f.name; | ||
var res$1; | ||
var res$2; | ||
@@ -593,7 +574,7 @@ // We dont run coverage in IE | ||
if (hasName) { | ||
res$1 = function (fun) { | ||
res$2 = function (fun) { | ||
return fun.name; | ||
}; | ||
} else { | ||
res$1 = function (fun) { | ||
res$2 = function (fun) { | ||
return fun.toString().match(/^\s*function\s*(\S*)\s*\(/)[1]; | ||
@@ -603,3 +584,3 @@ }; | ||
var functionName = res$1; | ||
var res$3 = res$2; | ||
@@ -824,7 +805,6 @@ // Determine id an ID is valid | ||
exports.explainError = res; | ||
exports.extend = extend; | ||
exports.jsExtend = extend$1; | ||
exports.assign = assign$1; | ||
exports.filterChange = filterChange; | ||
exports.flatten = flatten; | ||
exports.functionName = functionName; | ||
exports.functionName = res$3; | ||
exports.guardedConsole = guardedConsole; | ||
@@ -844,2 +824,2 @@ exports.hasLocalStorage = hasLocalStorage; | ||
exports.upsert = upsert; | ||
exports.uuid = uuid; | ||
exports.uuid = uuid; |
{ | ||
"name": "pouchdb-utils", | ||
"version": "6.1.0", | ||
"version": "6.1.1", | ||
"description": "Unassorted utilities used by PouchDB.", | ||
@@ -27,9 +27,9 @@ "main": "./lib/index.js", | ||
"clone-buffer": "1.0.0", | ||
"debug": "2.3.2", | ||
"debug": "2.6.0", | ||
"immediate": "3.0.6", | ||
"inherits": "2.0.3", | ||
"pouchdb-collections": "6.1.0", | ||
"pouchdb-errors": "6.1.0", | ||
"pouchdb-promise": "6.1.0" | ||
"pouchdb-collections": "6.1.1", | ||
"pouchdb-errors": "6.1.1", | ||
"pouchdb-promise": "6.1.1" | ||
} | ||
} |
@@ -8,4 +8,3 @@ import adapterFun from './adapterFun'; | ||
import explainError from './explainError'; | ||
import extend from './extend'; | ||
import jsExtend from './jsExtend'; | ||
import assign from './assign'; | ||
import filterChange from './filterChange'; | ||
@@ -36,4 +35,3 @@ import flatten from './flatten'; | ||
explainError, | ||
extend, | ||
jsExtend, | ||
assign, | ||
filterChange, | ||
@@ -40,0 +38,0 @@ flatten, |
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
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
83827
40
2321
1
+ Addeddebug@2.6.0(transitive)
+ Addedpouchdb-collections@6.1.1(transitive)
+ Addedpouchdb-errors@6.1.1(transitive)
+ Addedpouchdb-promise@6.1.1(transitive)
- Removeddebug@2.3.2(transitive)
- Removedpouchdb-collections@6.1.0(transitive)
- Removedpouchdb-errors@6.1.0(transitive)
- Removedpouchdb-promise@6.1.0(transitive)
Updateddebug@2.6.0
Updatedpouchdb-collections@6.1.1
Updatedpouchdb-errors@6.1.1
Updatedpouchdb-promise@6.1.1