1.0.1 • Published 11 years ago
lucene-escape-query v1.0.1
lucene-escape-query

Escape a string for a lucene query. Effectively removes all special characters.
Table of Contents generated with DocToc
Install
npm i -S lucene-escape-queryUsage
var luceneEscapeQuery = require('lucene-escape-query')
luceneEscapeQuery.escape('+Rainbow') // \+RainbowMethods
escape (<String> string)
Returns the string passed to it, with special characters(https://lucene.apache.org/core/2_9_4/queryparsersyntax.html#Escaping Special Characters) escaped.
Tests
Tests are in tape and code coverage is run though covert.
npm testwill run both server and browser testsnpm run test-browserandnpm run test-serverrun their respective testsnpm run tddwill run the server tests on every file change.
Developing
To publish, run npm run release -- [{patch,minor,major}]
NOTE: you might need to sudo ln -s /usr/local/bin/node /usr/bin/node to ensure node is in your path for the git hooks to work
Requirements
- npm > 2.0.0 So that passing args to a npm script will work.
npm i -g npm - git > 1.8.3 So that
git push --follow-tagswill work.brew install git
License
Artistic 2.0 © Joey Baker