How to use the builtin-modules/static.map function in builtin-modules

To help you get started, we’ve selected a few builtin-modules 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 SamVerschueren / alfred-node / index.js View on Github external
'use strict';
const alfy = require('alfy');
const builtinModules = require('builtin-modules/static');

const items = builtinModules.map(module => {
	const url = `https://nodejs.org/api/${module}.html`;

	return {
		title: module,
		autocomplete: module,
		arg: url,
		quicklookurl: url
	};
});

alfy.output(alfy.inputMatches(items, 'title'));

builtin-modules

A static list of the Node.js builtin modules from the latest Node.js version

MIT
Latest version published 5 months ago

Package Health Score

76 / 100
Full package analysis