UNPKG

iterator-helper

Version:

Provide helpers that polyfill all methods defined in [iterator helpers proposal](https://github.com/tc39/proposal-iterator-helpers), both for `Iterator` and `AsyncIterator`, and even more.

15 lines (11 loc) 307 B
const fs = require('fs').promises; async function main() { for (const file of await fs.readdir('./dist-esm')) { const name = './dist-esm/' + file; if ((await fs.stat(name)).isDirectory()) { continue; } await fs.rename(name, './dist/' + file.replace('.js', '.mjs')); } } main();