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

elasticsearch

Package Overview
Dependencies
Maintainers
1
Versions
128
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

elasticsearch - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

test/client.js

1

index.js

@@ -13,4 +13,5 @@ var Client = require('./lib/elasticsearch');

exports.Cluster = require('./lib/cluster');
exports.Index = require('./lib/index');
// For backwards compatibility
exports.createClient = createClient;

10

lib/utils.js

@@ -25,2 +25,3 @@ var http = require('http');

var buf = new Buffer(length),
message = '',
total = 0;

@@ -42,4 +43,9 @@ chunks.forEach(function chunk_cb(chunk) {

if (!((""+statusCode).match(/2\d\d/))) {
cb(res_json);
} else if (cb) {
if (res_json.error) {
message = res_json.error;
} else if (res_json.exists === false) {
message = 'Doc with id "'+res_json._id+'" and type "'+res_json._type+'" not found in index "'+res_json._index+'"';
}
cb(new Error(message));
} else {
cb(null, res_json);

@@ -46,0 +52,0 @@ }

@@ -5,3 +5,3 @@ {

"main": "index.js",
"version": "0.2.1",
"version": "0.2.2",
"author": "Nick Campbell (http://github.com/ncb000gt)",

@@ -23,7 +23,7 @@ "engines": {

"devDependencies": {
"nodeunit": "~0.7.4"
"tap": "~0.4.1"
},
"scripts": {
"test": "nodeunit tests/suites"
"test": "tap test/*.js"
}
}
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