Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'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'));