Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

periodicjs.core.data

Package Overview
Dependencies
Maintainers
2
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

periodicjs.core.data - npm Package Compare versions

Comparing version 0.7.6 to 0.7.7

33

adapters/loki.js

@@ -25,3 +25,3 @@ 'use strict';

//Iteratively checks if value was passed in options argument and conditionally assigns the default value if not passed in options
let { sort, limit, population, fields, skip, } = ['sort', 'limit', 'population', 'fields', 'skip', ].reduce((result, key) => {
let { sort, limit, population, fields, skip, } = ['sort', 'limit', 'population', 'fields', 'skip',].reduce((result, key) => {
if (options[key] && !isNaN(Number(options[key]))) options[key] = Number(options[key]);

@@ -80,3 +80,3 @@ result[key] = options[key] || this[key];

if (sort[key] < 1) { //descending
return [key, true, ];
return [key, true,];
} else {

@@ -140,3 +140,3 @@ return key;

//Iteratively checks if value was passed in options argument and conditionally assigns the default value if not passed in options
let { sort, limit, population, fields, skip, pagelength, query, } = ['sort', 'limit', 'population', 'fields', 'skip', 'pagelength', 'query', ].reduce((result, key) => {
let { sort, limit, population, fields, skip, pagelength, query, } = ['sort', 'limit', 'population', 'fields', 'skip', 'pagelength', 'query',].reduce((result, key) => {
if (options[key] && !isNaN(Number(options[key]))) options[key] = Number(options[key]);

@@ -303,3 +303,3 @@ result[key] = options[key] || this[key];

//Iteratively checks if value was passed in options argument and conditionally assigns the default value if not passed in options
let { sort, population, fields, docid, } = ['sort', 'population', 'fields', 'docid', ].reduce((result, key) => {
let { sort, population, fields, docid, } = ['sort', 'population', 'fields', 'docid',].reduce((result, key) => {
if (options[key] && !isNaN(Number(options[key]))) options[key] = Number(options[key]);

@@ -540,6 +540,23 @@ result[key] = options[key] || this[key];

let deleteid = options.deleteid || options.id;
if (typeof deleteid !== 'string') throw new Error('Must specify "deleteid" or "id" for delete');
let object = Model.findObject({ _id: deleteid, });
let result = Model.remove(object);
cb(null, result);
if (Array.isArray(deleteid)) {
_QUERY.call(this, {
query: {
_id: {
$in: deleteid,
},
},
}, (err, deleteDocs) => {
if (err) {
cb(err);
} else {
let result = Model.remove(deleteDocs);
cb(null, result);
}
});
} else {
if (typeof deleteid !== 'string') throw new Error('Must specify "deleteid" or "id" for delete');
let object = Model.findObject({ _id: deleteid, });
let result = Model.remove(object);
cb(null, result);
}
} catch (e) {

@@ -546,0 +563,0 @@ cb(e);

@@ -45,3 +45,3 @@ {

"jsdoc": "^3.4.3",
"lowkie": "^1.3.2",
"lowkie": "^1.3.3",
"mocha": "~2.2.5",

@@ -98,4 +98,4 @@ "mocha-lcov-reporter": "^1.2.0",

},
"version": "0.7.6",
"version": "0.7.7",
"license": "MIT"
}
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