AugustArchive / collections

📝 Collections library made in TypeScript

Home Page:https://collections.floofy.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Roadmap v0.2.0

auguwu opened this issue · comments

  • Add Collection#findKey function
  • Add Collection#entries function
  • Add toString to be Collection<string|function|object|array|class:{name}>
  • Add a custom iterator to iterate over key values:
for (const a of coll) {
    console.log(a); //> 'a' in coll.get(0)
}

Further instruction for Collection#toString (classes/functions)

check if it's a class:

// class
values.every(x => typeof x === 'function' && x.toString().includes('class'));

// function
values.every(x => typeof x === 'function' && x.toString().includes('function'));