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

elasto

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

elasto - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

12

lib/elasto.js

@@ -156,13 +156,3 @@ var elasticsearch = require('elasticsearch');

this.fields = function (keys) {
var fields = [];
if (isArray(keys)) {
fields = keys;
} else {
var args = Array.prototype.slice.call(arguments);
args.forEach(arguments, function (arg) {
fields.push(arg);
});
}
var fields = isArray(keys) ? keys : Array.prototype.slice.call(arguments);
this.options.fields = fields;

@@ -169,0 +159,0 @@ return this;

2

package.json
{
"name": "elasto",
"version": "1.0.0",
"version": "1.1.0",
"description": "ElasticSearch client",

@@ -5,0 +5,0 @@ "main": "index",

@@ -273,2 +273,19 @@ 'use strict';

it('should query specific fields (no array)', function(done) {
Elasto.query({
index: 'testing',
type: 'tweets'
})
.fields('name', 'id')
.exec()
.then(function(res) {
var docs = _.pluck(res.hits.hits, 'fields');
docs.forEach(function(doc){
_.keys(doc).length.should.equal(2);
})
})
.should.eventually.notify(done);
});
it('should exclude documents', function (done) {

@@ -275,0 +292,0 @@ var response = {};

Sorry, the diff of this file is not supported yet

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