Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/felquis/inout
Input data, transform it, transform it again and output the result
https://github.com/felquis/inout
Last synced: 1 day ago
JSON representation
Input data, transform it, transform it again and output the result
- Host: GitHub
- URL: https://github.com/felquis/inout
- Owner: felquis
- Created: 2015-08-16T02:23:02.000Z (about 9 years ago)
- Default Branch: main
- Last Pushed: 2021-12-22T23:59:39.000Z (almost 3 years ago)
- Last Synced: 2024-04-10T14:03:49.892Z (7 months ago)
- Language: JavaScript
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## In Out
> npm install inout --save
Example: find.js
```js
#!/usr/bin/env nodevar In = require('inout');
In(process.argv)
(function (data) { return data.splice(2); })
(function (data) { return data[0]; })
(function (data) { console.log('Find: ', data); return data; })
(function (data) {
var exec = require('child_process').exec;var child = exec('ls -a | grep ' + data, function(err, stdout, stderr) {
console.log(stdout);
});return data;
});
```Run:
> node find.js packageOutput:
> Find: package
> package.json