UNPKG
jumprope
Version:
latest (1.2.1)
rc (1.1.1)
1.2.1
1.2.0
1.1.1
1.1.0
1.0.1
1.0.0
1.0.0-rc1
Fast string editing in Javascript using skip lists
github.com/josephg/jumprope
josephg/jumprope
jumprope
/
simpleexample.js
9 lines
(6 loc)
•
154 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
var
Rope
=
require
(
'jumprope'
);
var
r =
new
Rope
(
"G'day"
); r.
insert
(
0
,
'Hi there\n'
)
console
.
log
(r.
toString
()); r.
del
(
9
,
5
);
console
.
log
(r.
toString
());