How to use the builtins.reduce function in builtins

To help you get started, we’ve selected a few builtins examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github OctoLinker / OctoLinker / packages / plugin-javascript / builtins-docs.js View on Github external
import builtins from 'builtins';

const docs = builtins.reduce((result, builtin) => {
  let filename = builtin;
  if (filename === 'module') {
    filename = 'modules';
  }
  result[builtin] = `https://nodejs.org/api/${filename}.html`;
  return result;
}, {});

docs.constants = 'https://github.com/nodejs/node/blob/master/lib/constants.js';

export default docs;

builtins

List of node.js builtin modules

MIT
Latest version published 7 months ago

Package Health Score

73 / 100
Full package analysis