New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

query-2-json

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

query-2-json

convert a query string to a json structure

latest
Source
npmnpm
Version
1.2.4
Version published
Maintainers
1
Created
Source

query-2-json

Build Status npm version npm

Inspired by react-querybuilder

It is simple to use but would be easier to store the query string and convert it back to the json format from the string.

Installation

npm install query-2-json

Usage

const q2j = require('query-2-json')

let q = "(a != 1 || (b == 2 && c <= 3)) && (d != 4)"

let json = q2j(q, { brackets: ['()'] });
console.log(JSON.stringify(json, null, 2))
let rule = q2j(json);
console.log(rule)

Keywords

json

FAQs

Package last updated on 30 Oct 2019

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