Socket
Socket
Sign inDemoInstall

pelias-query

Package Overview
Dependencies
Maintainers
6
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pelias-query - npm Package Compare versions

Comparing version 9.2.0 to 9.3.0

2

package.json

@@ -1,1 +0,1 @@

{"name":"pelias-query","version":"9.2.0","description":"An Elasticsearch query builder for Pelias","engines":{"node":">=4.0.0"},"main":"index.js","scripts":{"lint":"jshint .","units":"node test/run.js | tap-spec","test":"npm run units","validate":"npm ls","travis":"npm run check-dependencies && npm run test","semantic-release":"semantic-release pre && npm publish && semantic-release post","check-dependencies":"node_modules/.bin/npm-check --production"},"repository":{"type":"git","url":"https://github.com/pelias/query.git"},"author":"","license":"MIT","bugs":{"url":"https://github.com/pelias/query/issues"},"homepage":"https://github.com/pelias/query#readme","dependencies":{"check-types":"^7.0.0","lodash":"^4.14.1"},"devDependencies":{"deep-diff":"^0.3.4","jshint":"^2.5.6","npm-check":"git://github.com/orangejulius/npm-check.git#disable-update-check","precommit-hook":"^3.0.0","tap-spec":"^4.1.0","tape":"^4.2.0","semantic-release":"^8.0.3"},"pre-commit":["lint","validate","test","check-dependencies"]}
{"name":"pelias-query","version":"9.3.0","description":"An Elasticsearch query builder for Pelias","engines":{"node":">=4.0.0"},"main":"index.js","scripts":{"lint":"jshint .","units":"node test/run.js | tap-spec","test":"npm run units","validate":"npm ls","travis":"npm run check-dependencies && npm run test","semantic-release":"semantic-release pre && npm publish && semantic-release post","check-dependencies":"node_modules/.bin/npm-check --production"},"repository":{"type":"git","url":"https://github.com/pelias/query.git"},"author":"","license":"MIT","bugs":{"url":"https://github.com/pelias/query/issues"},"homepage":"https://github.com/pelias/query#readme","dependencies":{"check-types":"^7.0.0","lodash":"^4.14.1"},"devDependencies":{"deep-diff":"^0.3.4","jshint":"^2.5.6","npm-check":"git://github.com/orangejulius/npm-check.git#disable-update-check","precommit-hook":"^3.0.0","tap-spec":"^4.1.0","tape":"^4.2.0","semantic-release":"^8.0.3"},"pre-commit":["lint","validate","test","check-dependencies"]}

@@ -66,2 +66,26 @@ var ngrams = require('../../view/ngrams');

module.exports.tests.fuzziness_variable = function(test, common) {
test('fuzziness variable should be presented in query', function(t) {
var store = getBaseVariableStore();
store.var('ngram:fuzziness', 'fuzziness value');
var actual = ngrams(store);
var expected = {
match: {
'field value': {
analyzer: { $: 'analyzer value' },
boost: { $: 'boost value' },
query: { $: 'name value' },
fuzziness: { $: 'fuzziness value' }
}
}
};
t.deepEquals(actual, expected, 'should have returned object with fuzziness field');
t.end();
});
};
module.exports.all = function (tape, common) {

@@ -68,0 +92,0 @@ function test(name, testFunction) {

@@ -69,2 +69,29 @@ var phrase = require('../../view/phrase');

module.exports.tests.fuzziness_variable = function(test, common) {
test('fuzziness variable should be presented in query', function(t) {
var store = getBaseVariableStore();
store.var('phrase:fuzziness', 'fuzziness value');
var actual = phrase(store);
var expected = {
match: {
'field value': {
analyzer: { $: 'analyzer value' },
type: 'phrase',
boost: { $: 'boost value' },
slop: { $: 'slop value' },
query: { $: 'name value' },
fuzziness: { $: 'fuzziness value' }
}
}
};
t.deepEquals(actual, expected, 'should have returned object with fuzziness field');
t.end();
});
};
module.exports.all = function (tape, common) {

@@ -71,0 +98,0 @@ function test(name, testFunction) {

@@ -22,3 +22,7 @@

if (vs.isset('ngram:fuzziness')) {
view.match[ vs.var('ngram:field') ].fuzziness = vs.var('ngram:fuzziness');
}
return view;
};

@@ -25,3 +25,7 @@

if (vs.isset('phrase:fuzziness')) {
view.match[ vs.var('phrase:field') ].fuzziness = vs.var('phrase:fuzziness');
}
return view;
};
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