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 2.0.0 to 2.1.0

.jshintrc

14

lib/elasto.js

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

}
};
}

@@ -341,5 +341,15 @@ return this;

};
}
/**
* Returns the raw query that Elasticsearch will execute
* Useful methood for debugging or modify raw ElasticSearch queries
* @param {String} type Type of queries: search, count (search by default)
* @return {Object} ElasticSearch Query
*/
this.raw = function(type) {
return this._buildQuery({output: type || 'search'});
};
};
module.exports = Elasto;

2

package.json
{
"name": "elasto",
"version": "2.0.0",
"version": "2.1.0",
"description": "ElasticSearch client",

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

@@ -1,7 +0,4 @@

'use strict';
var chai = require('chai');
chai.should();
chai.use(require('chai-as-promised'));
var expect = chai.expect;
var _ = require('lodash');

@@ -74,3 +71,3 @@ var Bluebird = require('bluebird');

description: 'twitty tweet' //leave static
}
};
};

@@ -151,3 +148,3 @@

})
.forEach(function(value, i){
.forEach(function(value){
value.should.not.be.lessThan(previous);

@@ -295,3 +292,3 @@ previous = value;

_.keys(doc).length.should.equal(2);
})
});
})

@@ -372,2 +369,38 @@ .should.eventually.notify(done);

});
it('should return a search query by default when calling .raw()', function() {
var raw = Elasto.query({
index: 'circle_test',
type: 'tweets'
})
.fields('name')
.from(10)
.raw();
raw.should.be.ok;
});
it('should return a search query when calling .raw() with query', function() {
var raw = Elasto.query({
index: 'circle_test',
type: 'tweets'
})
.fields('name')
.from(10)
.raw('query');
raw.should.be.ok;
});
it('should return a search query by default when calling .raw() with count', function() {
var raw = Elasto.query({
index: 'circle_test',
type: 'tweets'
})
.fields('name')
.from(10)
.raw('count');
raw.should.be.ok;
});
});

@@ -374,0 +407,0 @@ });

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