Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Array.prototype.uniq = function() {
- return [...new Set(this)]
- }
- Array.prototype.asyncMap = async function(func) {
- const data = []
- for (let item of this) {
- data.push(await func(item))
- }
- return data
- }
- Array.prototype._concat = function() {
- return this.reduce((prev, next) => prev.concat(next), [])
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement