@cityssm/text-to-search-terms
TypeScript icon, indicating that this package has built-in type declarations

0.2.2 • Public • Published

text-to-search-terms

npm (scoped) DeepSource Maintainability codecov

Reduces large strings of text into distinct search terms.

import {
  textToSearchTermsString,
  OPTIONS_ALL
} from '@cityssm/text-to-search-terms'

console.log(
  textToSearchTerms("Hop to the shop! There's a sale on a mop!", OPTIONS_ALL)
)
// "mop on sale shop there's to"

Options

Option Default
removeCase true
removePunctuation true
removeDiacritics false
removeWordsWithoutLettersOrNumbers false
sortAlphabetically false
removeDuplicateWords true
removeDuplicatePartialWords false

Readme

Keywords

none

Package Sidebar

Install

npm i @cityssm/text-to-search-terms

Weekly Downloads

2

Version

0.2.2

License

MIT

Unpacked Size

17.5 kB

Total Files

9

Last publish

Collaborators

  • dgowans