syntaxe
TypeScript icon, indicating that this package has built-in type declarations

1.3.4 • Public • Published


Syntaxe for JavaScript/TypeScript

MIT licensed NPM Version Top Language


Syntaxe is a data query library inspired by graphql.

Syntaxe, with the help of a schema and a variety of operators, can be used to perform any number of query operations on most types of data e.g. String, Object or Array.

PLEASE REFER TO THE ORIGINAL SYNTAXE DOCUMENTATION FOR A MORE DETAILED AND UPDATED COVERAGE OF THE PROJECT.

Installation

Setup 💾

npm install syntaxe

Example

A basic example (ES Modules)

import Syntaxe from "syntaxe";

const sx = new Syntaxe({
  data: [1,2,3],
  schema: `[size]`
});

const result = await sx.query();
// Result: 3

// OR

sx.query().then((result) => {});
// Result: 3

A basic example (CommonJs)

const Syntaxe = require("syntaxe");

const sx = new Syntaxe({
  data: [1,2,3],
  schema: `[size]`
});

sx.query().then((result) => {});
// Result: 3

Support and Feedback

If you find any bugs or inconsistency, please submit an issue here in GitHub.

If you have any issues using the library, please contact me by email lolu.sholar@gmail.com with the subject 'Problem Using Syntaxe'.

You are welcome to contribute or participate in making the library better.

NOTE: Development of this library in various technologies, including PHP, C#, Java, Python, and others, is currently underway, with support for both standalone and REST API usage.

Changelog

All changes to the project

License

The MIT License (MIT)

Package Sidebar

Install

npm i syntaxe

Weekly Downloads

1

Version

1.3.4

License

MIT

Unpacked Size

64.3 kB

Total Files

12

Last publish

Collaborators

  • lolusholar