Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aljones15/flexion-programming-test
Simple immutable Transform
https://github.com/aljones15/flexion-programming-test
Last synced: 8 days ago
JSON representation
Simple immutable Transform
- Host: GitHub
- URL: https://github.com/aljones15/flexion-programming-test
- Owner: aljones15
- Created: 2018-11-20T16:17:21.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2018-11-20T16:34:53.000Z (almost 6 years ago)
- Last Synced: 2023-11-07T18:01:07.560Z (about 1 year ago)
- Language: JavaScript
- Size: 33.2 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Flexion NodeJs Code Challenge
```
npm i
npm test
npm start
```### Code Challenge Instructions:
Write a Node script (v8 preferred) that transforms data.json into data-transformed.json. There is no need for any UI, it’s fine to directly read in data.json from the current directory.### Restrictions:
No for or for…of loops
No let or varChecklist:
- [x] use only const or function paramaters (immutable all the way)
- [x] drop name and address
- [x] move customer.id up to the main object
- [x] keep the date, id, and name
- [x] use mocha and chai
- [x] change order to an array
- [x] add revenue to array quant * price| Change | To | Stays |
| ----------- | ------- | --- |
| customer.id | customerId | up |
| customer.order | array | true |
I customer.order | add revenue | true |
| customer.name | null | false |
| customer.address | null | false |You can use http://www.jsondiff.com/ in the files in output to verify