Gathering detailed insights and metrics for @jimpick/rope-sequence
Gathering detailed insights and metrics for @jimpick/rope-sequence
Gathering detailed insights and metrics for @jimpick/rope-sequence
Gathering detailed insights and metrics for @jimpick/rope-sequence
npm install @jimpick/rope-sequence
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
45 Stars
26 Commits
6 Forks
5 Watchers
1 Branches
2 Contributors
Updated on Jun 27, 2025
Latest Version
1.2.2-3
Package Id
@jimpick/rope-sequence@1.2.2-3
Unpacked Size
11.76 kB
Size
3.97 kB
File Count
6
NPM Version
6.4.1
Node Version
10.10.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
This module implements a single data type, RopeSequence
, which is a
persistent sequence type implemented as a loosely-balanced
rope.
It supports appending, prepending, and slicing without doing a full
copy. Random access is somewhat more expensive than in an array
(logarithmic, with some overhead), but should still be relatively
fast.
Licensed under the MIT license.
RopeSequence<T>
static
from
(?union<[T], RopeSequence<T>>) → RopeSequence<T>
Create a rope representing the given array, or return the rope itself if a rope was given.
static
empty
: RopeSequence<T>
The empty rope.
length
: number
The length of the rope.
append
(union<[T], RopeSequence<T>>) → RopeSequence<T>
Append an array or other rope to this one, returning a new rope.
prepend
(union<[T], RopeSequence<T>>) → RopeSequence<T>
Prepend an array or other rope to this one, returning a new rope.
slice
(from: ?number = 0, to: ?number = this.length) → RopeSequence<T>
Create a rope repesenting a sub-sequence of this rope.
get
(index: number) → T
Retrieve the element at the given position from this rope.
forEach
(f: fn(element: T, index: number) → ?bool, from: ?number, to: ?number)
Call the given function for each element between the given indices.
This tends to be more efficient than looping over the indices and
calling get
, because it doesn't have to descend the tree for every
element.
to
may be less then from
, in which case the iteration will happen
in reverse (starting at index from - 1
, down to index to
.
The iteration function may return false
to abort iteration early.
map
(f: fn(element: T, index: number) → U, from: ?number, to: ?number) → [U]
Map the given functions over the elements of the rope, producing a flat array.
flatten
() → [T]
Return the content of this rope as an array.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 0/26 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More