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.
33
33
34
34
## Set up instructions
35
35
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
+
36
40
1 . Fork the repo
37
41
2 . Clone your fork
38
42
3 . Create a branch
Original file line number Diff line number Diff line change 1
1
export default flatten
2
2
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
+ */
3
11
function flatten ( arr ) {
4
12
return arr . reduce ( function flattenReducer ( flat , toFlatten ) {
5
13
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
2
2
3
3
const regex = / ( \- \w ) / g
4
4
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
+ */
5
13
function snakeToCamel ( s ) {
6
14
return s . replace ( regex , function snakeToCamelReplacer ( m ) {
7
15
return m [ 1 ] . toUpperCase ( )
You can’t perform that action at this time.
0 commit comments