SelecTHOR ⚡⚒️
Choose your data the way Thor's hammer chose Thor.
Select JSON data with a query language inspired by SQL.
❯ Features
- Easy-to-use. Selecthor's API is dead simple, easy to use and easy to replace (if you ever want to).
- Typed. Selecthor is written 100% in TypeScript, so there is no need to install typings from an external source.
- Tested. Don't be surprised when using Selecthor, it ships with 100% code coverage.
- Documented. Modern documentation lives in code. That's why Selecthor contains TSDoc comments where needed.
- Compatible. Node.js, Browsers? Run Selecthor on the platform of your choice!
- Independent. Don't be afraid of big lock files. Selecthor uses zero dependencies.
❯ Installation
npm install selecthor
yarn add selecthor
❯ Usage
const selecthor = ; const data = animals: legs: 2 name: "Chimp" speed: kph: 45 mph: 2796 legs: 4 name: "Greyhound" speed: kph: 7242 mph: 45 legs: 4 name: "Polar Bear" speed: kph: 40 mph: 2485 ; const query = "SELECT name FROM animals WHERE speed.kph < 70";const selection = ; console; // [{"name":"Chimp"},{"name":"Polar Bear"}]