New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

datscript

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

datscript

a dat scripting language

npmnpm
Version
1.0.0
Version published
Weekly downloads
5
150%
Maintainers
1
Weekly downloads
 
Created
Source

datscript

This is an example of datscript, a data processing language for moving, manipulating, and organizing data.

This is just a proof of concept - it doesn't function yet

run

in demo.ds

a = clone a/b
b = load "http://google.com"
a | filter "hello"

Execute the datscript

$ npm i -g datscript
$ datscript demo.ds

how it all works

  • first, the grammar of the language is described in grammar.y
  • the grammar file uses jison, which is a JavaScript implementation of bison.
  • the grammar file contains both a lexer and a parser.
  • the parser must emit the SpiderMonkey Parser API which is fed into escodegen to generate valid JavaScript syntax.
  • the resulting script is then fed into the vm module and executed in a sandbox with a special set of globals.

goals

Overall, the goal of datscript is to create something people will use. As such, it should do a good job of meeting the constraints of non-experts who deal with lots of semi-structured data.

constraints

  • data might be dirty
  • data may come from various sources, like spreadsheets, websites, csv files, etc
  • people using datscript may be non-programmers

development

  • generate a new grammar.js file with npm run grammar.js

FAQs

Package last updated on 28 Sep 2014

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