Socket
Book a DemoInstallSign in
Socket

modules-words

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

modules-words

A get modules api words library

1.0.2
latest
Source
npmnpm
Version published
Weekly downloads
6
500%
Maintainers
1
Weekly downloads
 
Created
Source

This is a very simple library.

Its function is to get a list of all API interface names of a certain module.

English | 简体中文

Install

npm install modules-words --save

use

If you want to get the API word list of all modules of Node.js:

import { getNodejsWords } from "modules-words";
console.log(getNodejsWords());

If you want to get the API word list on the Window object:

import { getGlobalWords } from "modules-words";
console.log(getGlobalWords());

If you want to get the API word list of a certain module (it can be a Node.js built-in module or a third-party module):

import { getWords } from "modules-words";
console.log(getWords("vue"));

If you want to get the API word list of multiple modules (either Node.js built-in modules or third-party modules):

import { getWords } from "modules-words";
console.log(getWords("vue", "axios"));

main effect

This package was originally used with ESLint, a plug-in that checks whether words are spelled incorrectly.

This plugin is eslint-plugin-spellcheck.

You can add the corresponding configuration in your .eslintrc.js.

const { getWords, getGlobalWords } = require("modules-words");

module.exports = {
  // more...
  rules: {
    // more...
    "spellcheck/spell-checker": [
      "warn",
      {
        skipWords: [
          // more...
          ...getGlobalWords(),
          ...getWords("vue", "axios", "vuex", "vue-router"),
        ],
      },
    ],
  },
};

Or you can use it with other similar Linter plugins.

Of course, it can also be used where you want to use it.

API

getWords

Parameters: string |...string

Get the API word list of one or more modules.

getGlobalWords

Get the API word list of all built-in modules of Node.js, or get all the API word list on the Window object. It will automatically detect the operating platform.

Keywords

getwords

FAQs

Package last updated on 22 Nov 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.