tgr-wdn-query-lang
TypeScript icon, indicating that this package has built-in type declarations

1.1.7 • Public • Published

Warden Query Language for Typescript

TL;DR

Install the libary.

npm install tgr-wdn-query-lang
# or
yarn add tgr-wdn-query-lang

Use Query and Filter to parse or construct the query. Serialize the query into a string to send over the wire.

import { Query, Filter } from "tgr-wdn-query-lang";

let query = Query.parse("foo=hello");
query.filters.length; // 1
query.addFilter(new Filter("bar", "=", "world"));
query.toString()      //  "foo=hello bar=world"

Build

# Run the test suites
npm run test

# Build the package
npm run build

Publishing

As of this writing, we're publishing to https://www.npmjs.com. The API token is stored in tgr-tora.

This will likely change when we implement Horangi's private repository.

# Test & build
rm -Rf lib
npm run build

# Publish
npm config set '//registry.npmjs.org/:_authToken' "*****api-token****"
npm publish

# Unset it, so we don't leave it on the machine
npm config delete  '//registry.npmjs.org/:_authToken'

Readme

Keywords

none

Package Sidebar

Install

npm i tgr-wdn-query-lang

Weekly Downloads

0

Version

1.1.7

License

ISC

Unpacked Size

71.5 kB

Total Files

13

Last publish

Collaborators

  • horangi-infra