0.0.1 • Published 3 years ago

node-tuple v0.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

node-tuple

Immutable and Fixed-Length Array, so called Tuple is finally here. Tuple implementation on Nodejs, using Proxy and Reflect object.

How to use

const T = require("node-tuple");
const tuple0 = T(1,2,3); //or T(...[1,2,3]);
const tuple1 = T.from([1,2,3]);

console.log({ tuple0, tuple1 });
tuple[0] = 1e4; // Attempts to modify the element will throw an error...
0.0.1

3 years ago