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

hashpipe

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hashpipe

Object oriented shell experiment

0.0.10
latest
Source
npm
Version published
Weekly downloads
5
25%
Maintainers
1
Weekly downloads
 
Created
Source

hashpipe

Hashpipe is an experimental JSON-based shell. Imagine that Bash was designed for manipulating web APIs instead of a filesystem.

Featuring:

  • JSON-typed input & output (strings, numbers, objects, and arrays)
  • Alternative piping constructs (like the parallel pipe || and sequential pipe |=)
  • Modular design (useing modules and aliasing commands)

Getting started

Installation

$ npm install -g hashpipe
$ hashpipe
#|

At a glance

Bash-like command pipelines

#| cat names.txt | split '\n' | match John | sort
[ 'John Adams',
  'John King',
  'John Lee',
  'John Mitchell' ]

Parallel and series pipes to map commands over arrays

#| [1, 3, 4, 12] || * 5
[ 5, 15, 20, 60 ]

#|  echo john jacob jingleheimer | split ' ' || upper
[ 'JOHN', 'JACOB', 'JINGLEHEIMER' ]

Special @ syntax for traversing JSON objects and arrays

#| ['a', 'b', 'c'] @ 0
'a'

#| {name: "George", age: 55} @ name
'George'

#| [{name: "Fred"}, {name: "Jerry"}, {name: "Tim"}] @ :name
[ 'Fred', 'Jerry', 'Tim' ]

Designed for easy interaction with JSON APIs

#| get freegeoip.net/json
{ country: 'United States',
  region: 'California',
  city: 'Mountain View',
  postal_code: '94043' }

#| {encoded: 'SGV5IHRoZXJl'} | post http://spro.webscript.io/base64
{ decoded: 'Hey there' }

Learning more

Try one of the Hashpipe walkthroughs to see it in action:

FAQs

Package last updated on 01 Mar 2017

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