Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const { builtinModules } = require('node:module')
- const mots = []
- for (const name of builtinModules) {
- const module = require('node:' + name)
- for (const keys of Object.keys(module)) {
- if (typeof module[keys] === 'function') {
- mots.push(keys)
- }
- }
- }
- for (const keys of Object.keys(global)) {
- if (typeof module[keys] === 'function') {
- mots.push(keys)
- }
- }
- const uniqueMotsSort = [...new Set(mots)].sort((a, b) => a.localeCompare(b))
- console.log(uniqueMotsSort.join('\n'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement