You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

lucene-escape-query

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lucene-escape-query

Escape a string for a lucene query. Effectively removes all special characters.

1.0.1
latest
Source
npm
Version published
Weekly downloads
805
1.39%
Maintainers
1
Weekly downloads
 
Created
Source

lucene-escape-query NPM version Build Status Dependency Status

Escape a string for a lucene query. Effectively removes all special characters.

Table of Contents generated with DocToc

Install

npm i -S lucene-escape-query

Usage

var luceneEscapeQuery = require('lucene-escape-query')

luceneEscapeQuery.escape('+Rainbow') // \+Rainbow

Methods

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 test will run both server and browser tests
  • npm run test-browser and npm run test-server run their respective tests
  • npm run tdd will 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-tags will work. brew install git

License

Artistic 2.0 © Joey Baker

Keywords

lucene-escape-query

FAQs

Package last updated on 26 Feb 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts