Iterable Wrapper
A wrapper around Iterable to bring access to powerful methods like filter
, map
, etc ...
Install
Install by running this command:
npm i iwrap
How to use
import { IWrap } from "iwrap";
const scores = new Map([
["Alice", 500],
["Bob", 356],
["Charles", 42],
["David", 999],
]);
const display1 = Array.from(scores)
.map(([name, score]) => `${name}${".".repeat(30 - name.length)}${score}`)
.join("\n");
console.log(display1);
const display2 = IWrap.from(scores)
.map(([name, score]) => `${name}${".".repeat(30 - name.length)}${score}`)
.join("\n");
console.log(display2);
Author
👤 Tristan Guichaoua
📝 License
Copyright © 2021 Tristan Guichaoua.
This project is MIT licensed.