Pipelion is a simple, extensible, one-line expression language to pipe data through processing and transform functions. Pipelion stems from the guts of timelion
and kable
extending their caged potential to other projects and use-cases.
- status: experimental, unstable
Pipelion functions are chained to each other, just like streams.
Pipelion accepts 'strings',json objects, arrays of json objects
Strings will be modified into an object inside an array with key "data":"string" Objects will be modified into array with an object inside
[{"cpu_percent": 100, "time":123}, {"cpu_percent": 80, "time":124}, {"cpu_percent":30, "time":125}]
.average(cpu_percent=true)
[
{ cpu_percent: 100, time: 123, cpu_percent_average: 70 },
{ cpu_percent: 80, time: 124, cpu_percent_average: 70 },
{ cpu_percent: 30, time: 125, cpu_percent_average: 70 }
]
npm install -g pipelion
pipelion {expression} {input}
Pipelion has a few small examples
pipelion ".file(string.json)"
pipelion ".file(loki.json).parseLoki().flatten()"
pipelion ".fetch('https://api.crossref.org/works?query.author=terry_pratchett').flatten()"
pipelion ".fetch(https://jsonplaceholder.typicode.com/posts).filter(userId=10)"