-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change from eslint standard to google
update deps add more tests improve readme
- Loading branch information
1 parent
a2f0fa2
commit a2a494f
Showing
8 changed files
with
358 additions
and
4,994 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,21 @@ | ||
{ | ||
"env": { | ||
"commonjs": true, | ||
"es2021": true, | ||
"mocha": true, | ||
"node": true | ||
"commonjs": true, | ||
"es2021": true, | ||
"node": true, | ||
"mocha": true | ||
}, | ||
"extends": [ | ||
"standard" | ||
], | ||
"extends": "google", | ||
"parserOptions": { | ||
"ecmaVersion": 12 | ||
"ecmaVersion": 12 | ||
}, | ||
"rules": { | ||
"quote-props": [ | ||
"error", | ||
"consistent-as-needed" | ||
] | ||
"max-len": [ | ||
"error", 100 | ||
], | ||
"object-curly-spacing": [ | ||
"error", "always" | ||
], | ||
"space-infix-ops": "error" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,15 @@ | ||
function mapResponse (array) { | ||
return array.map(item => ({ | ||
/** | ||
* Map the Investing array response | ||
* @param {Array} array Array of data returned from Investing website | ||
* @return {Array} An array of objects with date and value properties | ||
*/ | ||
function mapResponse(array) { | ||
return array.map((item) => ({ | ||
date: item[0], | ||
value: item[1] | ||
})) | ||
value: item[1], | ||
})); | ||
} | ||
|
||
module.exports = { | ||
mapResponse | ||
} | ||
mapResponse, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.