New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

prql-node

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prql-node

Javascript bindings for prql-compiler

  • 0.1.3
  • unpublished
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

prql-js

JavaScript bindings for prql-compiler. Check out https://prql-lang.org for more context.

This uses wasm-pack to generate bindings1.

Installation

To install the currently published version:

npm install prql-js

This package is built to target a bundler (i.e. webpack). To use it with Node.js or import it directly in a browser as an ES module, build it using a suitable --target.

Usage

import compile from "prql-js";

const sql = compile(`from employees | select first_name`);
console.log(sql);

Prints:

SELECT
  first_name
FROM
  employees

For more information about the language, see reference book.

Development

Build:

wasm-pack build

This builds a node package in the pkg path. An example of including that as a dependency is in playground.

Test:

wasm-pack test --firefox

Footnotes

  1. though we would be very open to other approaches, and used trunk successfully in a rust-driven approach to this, RIP prql-web.

FAQs

Package last updated on 07 Jul 2022

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc