-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
44 lines (33 loc) · 1.08 KB
/
index.js
File metadata and controls
44 lines (33 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
require('./engine')
// var beautify = require('js-beautify').js,
// fs = require('fs');
// fs.readFile('test.js', 'utf8', function (err, data) {
// if (err) {
// throw err;
// }
// const text = beautify(data, { indent_size: 2, space_in_empty_paren: true, indent_with_tabs: true, end_with_newline: true})
// fs.writeFileSync('test.js', text)
// });
// const json = require('./scenario')
// console.log(json.scenes[0].keyboard[0]);
// let mod = {};
// try{
// mod = require('./scenarios')
// } catch(err) {
// // console.log(err.code === `MODULE_NOT_FOUND`)
// }
// console.log(mod)
// const scenario = require('./scenario')
// scenario.name = "bot-temp"
// for(let item in scenario){
// console.log(scenario[item])
// }
// let myArray = [[1, 2], [3, 4, 5], [6, 7, 8, 9], 45, 87];
// let myNewArray = [].concat.apply([], myArray)
// let myNewArray = myArray.reduce(function(prev, curr) {
// return prev.concat(curr);
// });
// for(let i = 0; i < myArray.length; i++){
// if(myArray[i].length)
// console.log(myArray[i].length)
// }