This repository was archived by the owner on Feb 20, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +20
-0
lines changed
Expand file tree Collapse file tree 3 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,10 @@ that I'll accept it before you spend time working on it.
3333
3434## Set up instructions
3535
36+ First of all, this is a JavaScript project that's distributed on [ npmjs.org] ( https://npmjs.org ) and
37+ therefore uses JavaScript tooling based on [ Node.js] ( https://nodejs.org/ ) with dependencies from npm.
38+ You're going to need to have those things installed to contribute to this project.
39+
36401 . Fork the repo
37412 . Clone your fork
38423 . Create a branch
Original file line number Diff line number Diff line change 11export default flatten
22
3+ /**
4+ * Original Source: http://stackoverflow.com/a/15030117/971592
5+ *
6+ * This method will flatten an array given to it.
7+ *
8+ * @param {Array } arr - The array to flatten
9+ * @return {Array } - The flattened array
10+ */
311function flatten ( arr ) {
412 return arr . reduce ( function flattenReducer ( flat , toFlatten ) {
513 return flat . concat ( Array . isArray ( toFlatten ) ? flatten ( toFlatten ) : toFlatten )
Original file line number Diff line number Diff line change @@ -2,6 +2,14 @@ export default snakeToCamel
22
33const regex = / ( \- \w ) / g
44
5+ /**
6+ * Original Source: http://stackoverflow.com/a/6661012/971592
7+ *
8+ * This method converts a snake-case string to a camelCase string
9+ *
10+ * @param {String } s - The snake-case string to camelCase
11+ * @return {String } - The camelCase version of the snake-case string
12+ */
513function snakeToCamel ( s ) {
614 return s . replace ( regex , function snakeToCamelReplacer ( m ) {
715 return m [ 1 ] . toUpperCase ( )
You can’t perform that action at this time.
0 commit comments