Functional Programming in TypeScript with Node
Setup
Tested on node 10
npm install
First Class functions
Arrow Functions
Run the sample code
tsc && node dist/arrowFunctions/index.js
Functions in a variable
tsc && node dist/functionsVariable/index.js
Functions as an argument
tsc && node dist/functionsAsArgument/index.js
Return functions as values
tsc && node dist/returnFunctions/index.js
Closures
tsc && node dist/closures/index.js
Private variables
tsc && node dist/private/index.js
Higher-order functions
tsc && node dist/higherOrder/index.js
Sample word counteer
tsc && node dist/wordCounter/index.js
Anagram
tsc && node dist/anagrams/index.js
Input validator
tsc && node dist/inputValidator/index.js