npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

regenerator-runtime-only

0.8.38

@regenerator-runtime-only-bot

npmRepoSnykSocket
Downloads:64
$ npm install regenerator-runtime-only
DailyWeeklyMonthlyYearly

regenerator-runtime-only

Just the runtime part of regenerator. If your publishing a module to npm that relies on regenerator, This allows you to include the runtime without also making people download the entire regenerator library %28complete with AST transformers and parsers etc.%29.

This module is automatically re-built and published by a bot that polls npm every 10 minutes. You can check the status of the bot by navigating to [regenerator-runtime-bot.jepso.com]%28https://regenerator-runtime-bot.jepso.com%29

Installation

npm install regenerator-runtime-only

Usage

var regeneratorRuntime = require%28%27regenerator-runtime-only%27%29;

function%2A foo%28%29 {
  yield 10;
  yield 32;
}
var gen = foo%28%29;
assert%28gen.next%28%29 + gen.next%28%29 === 42%29;

Then run regenerator src.js > index.js and the resulting output will only need to load regnerator-runtime-only. If ES6 features are unavailable, it will also load [es6-symbol]%28https://www.npmjs.com/package/es6-symbol%29 and [Promise]%28https://www.npmjs.org/package/promise%29 but it will not polyfill either feature on the glo al, and will prefer existing polyfills over these libraries.

License

MIT