0.0.0-pre.8 • Published 7 years ago

bumble-bee v0.0.0-pre.8

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

bumble-bee

bumble-bee is a data transformation CLI. Just provide a transformation script and pipe data to it.

Install

  • $ npm i bumble-bee -g

Usage

  • $ cowsay moo | bee -s replace -f replace-map.json

replace.js:

module.exports = function({pipe, file}){
	let map = JSON.parse(file);
	for(var key in map){
		if(map.hasOwnProperty(key)){
			pipe = pipe.replace(key, map[key]);
		}
	}
	return pipe;
};

Transformation scripts can return any value, even a Promise.

replace-map.json:

{
	"moo": "foo"
}

Output:

 _____
< foo >
 ----- 
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

Options

-V, --version          output the version number
-s, --script [module]  Name of script to handle transformation
-f, --file [file]      Path to input file to be passed to transformation
-h, --help             output usage information
0.0.0-pre.8

7 years ago

0.0.0-pre.7

7 years ago

0.0.0-pre.6

7 years ago

0.0.0-pre.5

7 years ago

0.0.0-pre.4

7 years ago

0.0.0-pre.3

7 years ago

0.0.0-pre.2

7 years ago

0.0.0-pre.1

7 years ago