Need private packages and team management tools?Check out npm Teams »

@trevor.linton/similarto

1.0.1 • Public • Published

Similar To

Find text similar to another peice of text

This is a simple function that takes as a first argument a string and as a second argument an array of strings and returns the string that most closely resembles the original.

const similarto = require('@trevor.linton/similarto')
similarto('I\'m going to france', ['To be or not to be that is the question', 'You dont see that sort of behavior in major appliances', 'I will be traveling to europe'])
    .then((x) => console.log(x))

Note, similarto is an async func, if used without await keyword, you'll need to use the returned result as a promise.

Install

npm i @trevor.linton/similarto

DownloadsWeekly Downloads

1

Version

1.0.1

License

Apache-2.0

Unpacked Size

16.5 kB

Total Files

5

Last publish

Collaborators

  • avatar