yarn add libjq
pnpm add libjq
npm install --save libjq
import { run } from 'libjq';
console.log(run('.foo', { foo: 'abc' }));
// abc
node-jq spawns new jq process for every function call, which is not optimal in performance and sometimes comes with an unstable result parsing.
This packages uses jq's C API directly, so does not suffer from such problems.