Skip to content

Commit

Permalink
(new doc) add esdoc for the first method
Browse files Browse the repository at this point in the history
  • Loading branch information
gtkatakura committed Jul 24, 2017
1 parent d6d2423 commit 19575af
Show file tree
Hide file tree
Showing 5 changed files with 421 additions and 12 deletions.
4 changes: 4 additions & 0 deletions .esdoc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"source": "./src",
"destination": "./doc"
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules/
coverage/
dist/
doc/
.nyc_output/
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"babel-loader": "^7.1.1",
"babel-preset-env": "^1.6.0",
"chai": "^4.1.0",
"esdoc": "^0.5.2",
"eslint": "3.19.0",
"eslint-config-airbnb": "^15.0.2",
"eslint-plugin-import": "2.6.1",
Expand Down
10 changes: 10 additions & 0 deletions src/array/flatten.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
/**
* Flattens `array` a single level deep.
*
* @param {Array} array The array to flatten.
* @returns {Array} Returns the new flattened array.
* @example
*
* flatten([1, [2, [3]])
* // => [1, 2, [3]]
*/
const flatten = array => [].concat(...array);

export default flatten;
Loading

0 comments on commit 19575af

Please sign in to comment.