Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/utils: add all missing Array generics #492

Open
mindrones opened this issue Jul 1, 2022 · 0 comments
Open

/utils: add all missing Array generics #492

mindrones opened this issue Jul 1, 2022 · 0 comments

Comments

@mindrones
Copy link
Contributor

mindrones commented Jul 1, 2022

  • investigate which functions of [1] are not covered by functions accepting iterables in lamb or @svizzle/utils

    • for those having a correspondent function in @svizzle/utils [2], make sure they have @see pointing to the correspondent Array method

    • provide the missing ones as generics (e.g. splice) with tests as usual so that we can see how they work

  • for all of them, make sure their name explicitly refer to a array input (e.g. split seems too generic)

(if needed, split this task in 2+ PRs)

[1] Possibly missing String generics

Array.prototype.copyWithin()
Array.prototype.entries()
Array.prototype.every()
Array.prototype.fill()
Array.prototype.filter()
Array.prototype.find()
Array.prototype.findIndex()
Array.prototype.flat()
Array.prototype.flatMap()
Array.prototype.forEach()
Array.from()
Array.prototype.indexOf()
Array.isArray()
Array.prototype.keys()
Array.prototype.lastIndexOf()
Array.prototype.map()
Array.of()
Array.prototype.pop()
Array.prototype.push()
Array.prototype.reduce()
Array.prototype.reduceRight()
Array.prototype.reverse()
Array.prototype.shift()
Array.prototype.slice()
Array.prototype.some()
Array.prototype.sort()
Array.prototype.splice()
Array.prototype.toLocaleString()
Array.prototype.toString()
Array.prototype.unshift()
Array.prototype.values()

[2] Existing Array generics

method current name new name
Array.prototype.concat concat
Array.prototype.includes includes arrayIncludes
Array.prototype.join join [remove?](https://ascartabelli.github.io/lamb/module-lamb.html#joinWith)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant