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

thinky

Package Overview
Dependencies
Maintainers
1
Versions
129
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

thinky - npm Package Compare versions

Comparing version 1.14.4 to 1.14.5

28

lib/model.js

@@ -926,17 +926,21 @@ var util = require(__dirname+'/util.js');

&& (util.isPlainObject(arguments[0]))) {
var keys = Object.keys(arguments[0]);
if ((keys.length === 1) && (this._getModel()._indexes[keys[0]] === true)) {
query = query.getAll(arguments[0][keys[0]], {index: keys[0]});
return query;
// Optimize a filter with an object
// We replace the first key that match an index name
var filter = arguments[0];
var keys = Object.keys(filter).sort(); // Lexicographical order
for(var i=0 ; i<keys.length; i++) {
var index = keys[i];
if (this._getModel()._indexes[index] === true) { // Index found
query = query.getAll(filter[index], {index: index});
delete filter[index];
break;
}
}
else {
query = query[key].apply(query, arguments);
return query;
}
}
else {
query = query[key].apply(query, arguments);
return query;
}
query = query[key].apply(query, arguments);
return query;
}

@@ -943,0 +947,0 @@ break;

{
"name": "thinky",
"version": "1.14.4",
"version": "1.14.5",
"description": "RethinkDB ORM for Node.js",

@@ -5,0 +5,0 @@ "main": "lib/thinky.js",

@@ -117,2 +117,6 @@ # Thinky

- [colprog](https://github.com/colprog)
- [flienteen](https://github.com/flienteen)
- [marshall007](https://github.com/marshall007)
- [Morhaus](https://github.com/Morhaus)
- [nikaspran](https://github.com/nikaspran)

@@ -119,0 +123,0 @@ - [wezs](https://github.com/wezs)

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