-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathscratch.js
44 lines (38 loc) · 817 Bytes
/
scratch.js
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
const sundayDriver = require('./src/index')
let options = {
// file: './tests/docs/500-k.txt',
// file: './tests/docs/buddyHolly.txt',
// file: './tests/docs/abc.txt',
file: '/Users/spencer/data/wikipedia/enwiki-latest-pages-articles.xml',
start: '51%',
// end: '80%',
splitter: "<page",
// chunkSize: 20,
each: (str, resume) => {
console.log(str.length)
resume()
},
// atPercent: {
// 50: (status) => {
// console.log('50%')
// },
// 75: () => {
// console.log('75%')
// },
// },
atInterval: {
'1min': (status) => {
console.log(status)
console.log('1 minute')
},
'2mins': () => {
console.log('2 minutes')
},
}
}
//23 seconds
//19 seconds
//18 seconds
sundayDriver(options).then(() => {
console.log('done!')
})