node-sheep

0.0.4 • Public • Published

a handy script to help write nodejs in shell

install

npm install -g node-sheep

usage

echo 1 2 3 4 5 | sheep "
     numbers = input.split(/\s/).filter(function(item){
         return item;
     }).map(function(item){
         return parseInt(item)+2;
     });
     put(numbers.join(':'))
"
   
# 3:4:5:6:7   

All stdin has been buffered into var input. var put is the alias to console.log.

Readme

Keywords

none

Package Sidebar

Install

npm i node-sheep

Weekly Downloads

0

Version

0.0.4

License

ISC

Last publish

Collaborators

  • nstal