egeozcan / ppipe Goto Github PK
View Code? Open in Web Editor NEWpipes values through functions, an alternative to using the proposed pipe operator ( |> ) for ES
License: ISC License
pipes values through functions, an alternative to using the proposed pipe operator ( |> ) for ES
License: ISC License
Would you like that?
Very cool library btw!
How can i use this library, in this way.
import { ppipe } from "ppipe"
I worked on a similar Pipe system a year and a half ago, and I must say, great job!
I compared the functionality of your Pipe versus mine for functionalities that might be of interest, and I came up with one that could be good - returning the pipe as a wrapper function.
From an example code of mine:
function employeePipe() {
return Pipe.build()
.pipe(search)
.map(x => {data: x, tag: x, search: x })
.wrap();
}
So what happens above is that the pipe is built with a set of operations (search, then map), and then is returned as a function that can be reused. This can be really useful as you can pass the pipe around and use it like any other function.
It is equivalent to
function myPipe(data){
return ppipe(data)
.pipe(add, 1)
.pipe(double)
.pipe(square)
.pipe(divide, _, 8)
.pipe(add, 1)();
}
Let me know what you think!
Cheers ๐ฆ
After running npm test
, you should be able to see the coverage of the code. This would make ppipe
more trustworthy and would also help people that want to contribute (assuming that there are lines or branches not covered by the current tests). Awesome project btw ๐
No coverage directory.
npm test
ls
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.