MCPcopy Index your code
hub / github.com/nodejs/node / writeSequences

Function writeSequences

test/parallel/test-string-decoder.js:271–285  ·  view source on GitHub ↗
(length, start, sequence)

Source from the content-addressed store, hash-verified

269// [ [ 0, 1 ], [ 1, 2 ], [ 2, 3 ] ]
270// ]
271function writeSequences(length, start, sequence) {
272 if (start === undefined) {
273 start = 0;
274 sequence = [];
275 } else if (start === length) {
276 return [sequence];
277 }
278 let sequences = [];
279 for (let end = length; end > start; end--) {
280 const subSequence = sequence.concat([[start, end]]);
281 const subSequences = writeSequences(length, end, subSequence, sequences);
282 sequences = sequences.concat(subSequences);
283 }
284 return sequences;
285}

Callers 1

testFunction · 0.85

Calls 1

concatMethod · 0.80

Tested by 1

testFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…