JS Functional Programming test
Create a Transformer object with a transform function with the following specifications:
transformwill receive an object and output another object.- All the functions inside
TransformerMUST be pure functions. - Functions MUST have less of two arguments.
- All data structures MUST be immutable. (You SHOULD NOT use mutator methods).
- Cannot use the
Setobject. - Reuse code.
- The statements
if-else,for,for-in,whileanddo-whileare forbidden.
The Transformer should be exported as the default value in the index file of the src folder.
The Transformer will be validated using npm test. Don't change anything outside the src folder.