UNPKG

@codeparticle/formal

Version:

A <2kb library for validating data of any kind

1 lines 449 B
{"version":3,"sources":["../src/utils/pipe.ts"],"sourcesContent":["/**\n * Pipe a set of functions over an argument, starting at the leftmost argument\n *\n * @author Nick Krause\n * @license MIT\n */\n\nconst pipe =\n <T = any>(...fns: Array<(v: T) => any>) =>\n (x: T) =>\n fns.reduce((v, f) => f(v), x)\n\nexport { pipe }\n"],"mappings":";AAAA,AAOA,IAAM,OACJ,IAAa,QACX,CAAC,MACC,IAAI,OAAO,CAAC,GAAG,MAAM,EAAE,CAAC,GAAG,CAAC;","names":[]}