AugustArchive/collections

Roadmap v0.2.0

auguwu opened this issue · 2 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'));