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

pouchdb-core

Package Overview
Dependencies
Maintainers
3
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pouchdb-core - npm Package Compare versions

Comparing version 6.0.1 to 6.0.2

src/evalFilter-browser.js

32

lib/index-browser.js

@@ -18,18 +18,22 @@ 'use strict';

function evalFilter(input) {
return scopedEval('return ' + input + ';', {});
return scopedEval('"use strict";\nreturn ' + input + ';', {});
}
function evalView(input) {
/* jshint evil:true */
return new Function('doc', [
'var emitted = false;',
'var emit = function (a, b) {',
' emitted = true;',
'};',
'var view = ' + input + ';',
'view(doc);',
'if (emitted) {',
' return true;',
'}'
].join('\n'));
var code = [
'return function(doc) {',
' "use strict";',
' var emitted = false;',
' var emit = function (a, b) {',
' emitted = true;',
' };',
' var view = ' + input + ';',
' view(doc);',
' if (emitted) {',
' return true;',
' }',
'};'
].join('\n');
return scopedEval(code, {});
}

@@ -1384,3 +1388,3 @@

// managed automatically by set-version.js
var version = "6.0.1";
var version = "6.0.2";

@@ -1387,0 +1391,0 @@ PouchDB.version = version;

@@ -14,12 +14,14 @@ 'use strict';

var pouchdbMerge = require('pouchdb-merge');
var scopedEval = _interopDefault(require('scope-eval'));
var vm = _interopDefault(require('vm'));
var pouchdbErrors = require('pouchdb-errors');
function evalFilter(input) {
return scopedEval('return ' + input + ';', {});
var code = '(function() {\n"use strict";\nreturn ' + input + '\n})()';
return vm.runInNewContext(code);
}
function evalView(input) {
/* jshint evil:true */
return new Function('doc', [
var code = [
'"use strict";',
'var emitted = false;',

@@ -34,3 +36,5 @@ 'var emit = function (a, b) {',

'}'
].join('\n'));
].join('\n');
return vm.runInNewContext('(function(doc) {\n' + code + '\n})');
}

@@ -1385,3 +1389,3 @@

// managed automatically by set-version.js
var version = "6.0.1";
var version = "6.0.2";

@@ -1388,0 +1392,0 @@ PouchDB.version = version;

{
"name": "pouchdb-core",
"version": "6.0.1",
"version": "6.0.2",
"description": "The core of PouchDB as a standalone package.",

@@ -21,12 +21,14 @@ "main": "./lib/index.js",

"js-extend": "1.0.1",
"pouchdb-collections": "6.0.1",
"pouchdb-errors": "6.0.1",
"pouchdb-merge": "6.0.1",
"pouchdb-promise": "6.0.1",
"pouchdb-utils": "6.0.1",
"pouchdb-collections": "6.0.2",
"pouchdb-errors": "6.0.2",
"pouchdb-merge": "6.0.2",
"pouchdb-promise": "6.0.2",
"pouchdb-utils": "6.0.2",
"scope-eval": "0.0.3"
},
"browser": {
"./lib/index.js": "./lib/index-browser.js"
"./lib/index.js": "./lib/index-browser.js",
"./src/evalFilter.js": "./src/evalFilter-browser.js",
"./src/evalView.js": "./src/evalView-browser.js"
}
}

@@ -1,7 +0,9 @@

import scopedEval from 'scope-eval';
import vm from 'vm';
function evalFilter(input) {
return scopedEval('return ' + input + ';', {});
var code = '(function() {\n"use strict";\nreturn ' + input + '\n})()';
return vm.runInNewContext(code);
}
export default evalFilter;
export default evalFilter;

@@ -0,4 +1,6 @@

import vm from 'vm';
function evalView(input) {
/* jshint evil:true */
return new Function('doc', [
var code = [
'"use strict";',
'var emitted = false;',

@@ -13,5 +15,7 @@ 'var emit = function (a, b) {',

'}'
].join('\n'));
].join('\n');
return vm.runInNewContext('(function(doc) {\n' + code + '\n})');
}
export default evalView;
export default evalView;
// managed automatically by set-version.js
export default "6.0.1";
export default "6.0.2";
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