Socket
Socket
Sign inDemoInstall

bash-parser

Package Overview
Dependencies
28
Maintainers
4
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

bash-parser

Standard compliant bash parser


Version published
Maintainers
4
Weekly downloads
3,898
decreased by-28.62%

Weekly downloads

Readme

Source

bash-parser

Parses bash source code to produce an AST

Travis Build Status Coveralls NPM module NPM downloads Try online

Installation

npm install --save bash-parser

Usage

  const parse = require('bash-parser');
  const ast = parse('echo ciao');

ast result is:

{
		type: "Script",
		commands: [
			{
				type: "SimpleCommand",
				name: {
					text: "echo",
					type: "Word"
				},
				suffix: [
					{
						text: "ciao",
						type: "Word"
					}
				]
			}
		]
	}
  • cash - This parser should become the parser used by cash (and also vorpal)
  • nsh - This parser should become the parser used by nsh
  • js-shell-parse - bash-parser was born as a fork of js-shell-parse, but was rewritten to use a jison grammar
  • jison - Bison in JavaScript.

Documentation

Look in documents folder

License

The MIT License (MIT)

Copyright (c) 2016 vorpaljs

FAQs

Last updated on 22 Jun 2017

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc