Socket
Socket
Sign inDemoInstall

@types/stopword

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/stopword - npm Package Compare versions

Comparing version 0.3.0 to 1.0.2

125

stopword/index.d.ts

@@ -1,50 +0,85 @@

// Type definitions for stopword 0.3
// Type definitions for stopword 1.0
// Project: https://github.com/fergiemcdowall/stopword
// Definitions by: Rico Sandyca Novenza <https://github.com/ricosandyca>
// Piotr Błażejewicz <https://github.com/peterblazejewicz>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* Stopword removal
*
* @param text Array string of words
* @param stopwords Array string of your custom stopwords (default: English stopwords | .en)
*/
export function removeStopwords(text: string[], stopwords?: string[]): string[];
export as namespace sw;
/**
* Get array of stopwords according by language code
*/
export const af: string[];
export const ar: string[];
export const bn: string[];
export const br: string[];
export const da: string[];
export const de: string[];
export const en: string[];
export const es: string[];
export const fa: string[];
export const fr: string[];
export const fi: string[];
export const ha: string[];
export const he: string[];
export const hi: string[];
export const id: string[];
export const it: string[];
export const ja: string[];
export const lgg: string[];
export const lggo: string[];
export const my: string[];
export const nl: string[];
export const no: string[];
export const pa: string[];
export const pl: string[];
export const pt: string[];
export const ru: string[];
export const so: string[];
export const st: string[];
export const sv: string[];
export const sw: string[];
export const vi: string[];
export const yo: string[];
export const zh: string[];
export const zu: string[];
declare namespace stopword {
interface Stopword {
/**
* Stopword removal
*
* @param text Array string of words
* @param stopwords Array string of your custom stopwords (default: English stopwords | .en)
*/
removeStopwords: (text: string[], stopwords?: string[]) => string[];
}
type LanguageCode =
| 'af'
| 'ar'
| 'bg'
| 'bn'
| 'br'
| 'ca'
| 'cs'
| 'da'
| 'de'
| 'el'
| 'en'
| 'eo'
| 'es'
| 'et'
| 'eu'
| 'fa'
| 'fi'
| 'fr'
| 'ga'
| 'gl'
| 'ha'
| 'he'
| 'hi'
| 'hr'
| 'hu'
| 'hy'
| 'id'
| 'it'
| 'ja'
| 'ko'
| 'la'
| 'lgg'
| 'lggo'
| 'lv'
| 'mr'
| 'my'
| 'nl'
| 'no'
| 'pa'
| 'pl'
| 'pt'
| 'ptbr'
| 'ro'
| 'ru'
| 'sk'
| 'sl'
| 'so'
| 'st'
| 'sv'
| 'sw'
| 'th'
| 'tr'
| 'ur'
| 'vi'
| 'yo'
| 'zh'
| 'zu';
}
declare const stopword: {
[Language in stopword.LanguageCode]: string[];
} &
stopword.Stopword;
export = stopword;
{
"name": "@types/stopword",
"version": "0.3.0",
"version": "1.0.2",
"description": "TypeScript definitions for stopword",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/stopword",
"license": "MIT",

@@ -11,2 +12,7 @@ "contributors": [

"githubUsername": "ricosandyca"
},
{
"name": "Piotr Błażejewicz",
"url": "https://github.com/peterblazejewicz",
"githubUsername": "peterblazejewicz"
}

@@ -23,4 +29,4 @@ ],

"dependencies": {},
"typesPublisherContentHash": "b6c01ec6f9546c38eedada3d01d5951d1750ef8178bd8c81604c43dd89ac8ee3",
"typeScriptVersion": "2.8"
"typesPublisherContentHash": "145c6d6d89ff882ba5cbb49aec167a3e6f047ae01cb0fb658f4538e49e2ccb09",
"typeScriptVersion": "3.7"
}

@@ -9,9 +9,98 @@ # Installation

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/stopword.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/stopword/index.d.ts)
````ts
// Type definitions for stopword 1.0
// Project: https://github.com/fergiemcdowall/stopword
// Definitions by: Rico Sandyca Novenza <https://github.com/ricosandyca>
// Piotr Błażejewicz <https://github.com/peterblazejewicz>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export as namespace sw;
declare namespace stopword {
interface Stopword {
/**
* Stopword removal
*
* @param text Array string of words
* @param stopwords Array string of your custom stopwords (default: English stopwords | .en)
*/
removeStopwords: (text: string[], stopwords?: string[]) => string[];
}
type LanguageCode =
| 'af'
| 'ar'
| 'bg'
| 'bn'
| 'br'
| 'ca'
| 'cs'
| 'da'
| 'de'
| 'el'
| 'en'
| 'eo'
| 'es'
| 'et'
| 'eu'
| 'fa'
| 'fi'
| 'fr'
| 'ga'
| 'gl'
| 'ha'
| 'he'
| 'hi'
| 'hr'
| 'hu'
| 'hy'
| 'id'
| 'it'
| 'ja'
| 'ko'
| 'la'
| 'lgg'
| 'lggo'
| 'lv'
| 'mr'
| 'my'
| 'nl'
| 'no'
| 'pa'
| 'pl'
| 'pt'
| 'ptbr'
| 'ro'
| 'ru'
| 'sk'
| 'sl'
| 'so'
| 'st'
| 'sv'
| 'sw'
| 'th'
| 'tr'
| 'ur'
| 'vi'
| 'yo'
| 'zh'
| 'zu';
}
declare const stopword: {
[Language in stopword.LanguageCode]: string[];
} &
stopword.Stopword;
export = stopword;
````
### Additional Details
* Last updated: Wed, 26 Feb 2020 19:36:13 GMT
* Last updated: Sat, 28 Aug 2021 21:01:22 GMT
* Dependencies: none
* Global values: none
* Global values: `sw`
# Credits
These definitions were written by [Rico Sandyca Novenza](https://github.com/ricosandyca).
These definitions were written by [Rico Sandyca Novenza](https://github.com/ricosandyca), and [Piotr Błażejewicz](https://github.com/peterblazejewicz).

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc