Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

array-like/swap

Repository files navigation

ArrayLike value swapping for JavaScript. See docs.

import {swapRanges} from '@array-like/swap';
import {alloc} from '@array-like/alloc';
import {iota} from '@array-like/iota';
const n = 6;
const a = alloc(n);
iota(a, 0, n, 0);
const b = alloc(n);
iota(b, 0, n, 0);
swapRanges(a, 0, 3, b, 3);
a; // 3 4 5 3 4 5
b; // 0 1 2 0 1 2

License Version Tests Dependencies GitHub issues Downloads

Code issues Code maintainability Code coverage (cov) Code technical debt Documentation Package size

About

πŸ”€ ArrayLike value swapping for JavaScript

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /