arraylikeobj
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

ArrayLike

NPM Version NPM Downloads

Similar to a normal array, but without the functions.

const ArrayLike = require("arraylikeobj");
const arraylike1 = new ArrayLike("Hello", "World");

for (const element of arraylike1) {
    console.log(element); /* Expected output: Hello
                                              World */
}
Property / Method Description Returns Is iterable
length The length of the object. number false
entries() An array of the keys and values of the object. [number, type] (for every entry) true
keys() The keys of the object. number (for every entry) true
values() The values of the object. type (for every entry) true
toString(separator?: string) A string representation of the object, with the values joined by the separator. string false

Inspired by Ecma.

Package Sidebar

Install

npm i arraylikeobj

Weekly Downloads

10

Version

1.1.1

License

MIT

Unpacked Size

4.79 kB

Total Files

6

Last publish

Collaborators

  • hiimjustin000