This package can be used independently, or be used as the registry for the npm package rewrap.
See rewrap for more information.
npm install regexp-frequent
npm install rewrap
const reBuiltins = require('regexp-frequent');
const rewrap = require('rewrap');
rewrap.registry(reBuiltins);
Just see index.js.