node-train
Inspired by Clojure's "thread-last" macro.
Installation
Npm:
$ npm i node-train
Yarn:
$ yarn add node-train
Use case
const train = const _ = const calls = await return calls // same asconst calls = callsResponseitemsconst callsWithTotalSpending = await const callsWithTotalSpendingAndShopName = await const callsWithTotalSpendingAndShopNameAndCustomer = await const callsWithTotalSpendingAndShopNameAndCustomerAndBranchId = await const callsWithTotalSpendingAndShopNameAndCustomerAndBranchIdAndProductDescription = await const lastCallWithTotalSpendingAndShopNameAndCustomerAndBranchIdAndProductDescription = _ return lastCallWithTotalSpendingAndShopNameAndCustomerAndBranchIdAndProductDescription