-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
21 lines (15 loc) · 713 Bytes
/
app.js
File metadata and controls
21 lines (15 loc) · 713 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// npm - global command, comes with node
// npm --version
// local dependency - use it only in this particular project
// npm i <packageName> (can use also install instead of i)
// global dependency - use it in any project
// npm install -g <packageName> (can use also i instead of install, same below)
// sudo npm install -g <packageName> (mac)
// package.json - manifest file (stores important info about project/package)
// manual approach (create package.json in the root, create properties etc)
// npm init (step by step, press enter to skip)
// npm init -y (everything default)
const _ = require('lodash')
const items = [1, [2, [3, [4]]]]
const newItems = _.flattenDeep(items)
console.log(newItems)