UNPKG
sowstring
Version:
latest (2.2.2)
2.2.2
2.2.1
2.1.1
2.0.0
1.5.0
1.4.0
1.3.0
1.2.0
1.1.2
1.1.1
1.1.0
1.0.0
Parse intended strings
github.com/ezaca/sowstring
ezaca/sowstring
sowstring
/
src
/
cache.js
18 lines
(16 loc)
•
345 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
module.exports =
class
Cache
{
constructor
(options) {
this
.options
this
.items = [] } push (item) {
this
.items.push (item) } flush (treeBuilder) {
var
item
for
(item of
this
.items) { treeBuilder.push (item) }
this
.items.length =
0
} }