create package.js
npm init -y
create tsconfig.json
tsc --init
install deps
| <?php | |
| use Psr\EventDispatcher\EventDispatcherInterface; | |
| use Symfony\Component\HttpFoundation as Http; | |
| /** | |
| * HttpKernel: "Get the response, and get out." | |
| * | |
| * As soon as the kernel gets its hands on a Response object, it says "I'm done" and returns it. | |
| * It is only interested in finding a Response object, at which point it will call it a day. |
| const compose = (...fns) => (...args) => { | |
| return fns.slice(0, -1).reduceRight((res, fn) => fn(res), | |
| fns[fns.length -1].apply(null,args) | |
| ); | |
| }; | |
| const pipe = (f1, ...fns) => (...args) => { | |
| return fns.reduce((res, fn) => fn(res), f1.apply(null,args)); | |
| }; |
create package.js
npm init -y
create tsconfig.json
tsc --init
install deps