Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Search parser

This is a search parser for query syntax comprising of macros and logic operators.

Installation

npm install http://github.com/fl4re/search_parser

Usage

const search_parser = require("search_parser");
//macro regular expression to catch specific keywords and eventual operators
const macro_regex = /^(kind|mime|created|modified|extension|size|depth):(<=?|>=?|\.\.)?$/;
const query_string = 'test AND query OR "hello word" kind: file';

var query_json = search_parser(query_string, macro_regex);

Test

npm test

Check programms are based on mocha and should npm modules.

License

The MIT License (MIT)

About

Search parser for url query parameters

Resources

Stars

0 stars

Watchers

4 watching

Forks

Releases

Packages

Contributors

Languages