Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dictionary-typeahead

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dictionary-typeahead - npm Package Compare versions

Comparing version 3.0.2 to 3.0.3

2

package.json
{
"name": "dictionary-typeahead",
"version": "3.0.2",
"version": "3.0.3",
"description": "typeahead that utilizes a custom dictionary",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -15,3 +15,3 @@ #dictionary-typeahead

####ES6
####ES2016

@@ -24,7 +24,11 @@ ```

const dictionary = [
"Super cool",
"Super",
"Typeahead",
"Type Ahead",
"Auto Complete is cool"
"Yellowstone",
"Yellowstone National Park",
"Grand Canyon",
"Arches",
"Arches National Park",
"Yosemite National Park",
"Yosemite",
"INYO National Park",
"INYO"
];

@@ -47,7 +51,11 @@

var dictionary = [
"Super cool",
"Super",
"Typeahead",
"Type Ahead",
"Auto Complete is cool"
"Yellowstone",
"Yellowstone National Park",
"Grand Canyon",
"Arches",
"Arches National Park",
"Yosemite National Park",
"Yosemite",
"INYO National Park",
"INYO"
];

@@ -86,6 +94,6 @@

|---|---|---|---|---|
|typeAhead.suggest(dictionary, text, caretPosition) | Given a dictionary of keywords, the user input text, and the user's caret position, find the set of matching suggestions | returns an array of suggestions e.g. `["Super", "Super cool!"]` |
|typeAhead.suggest(dictionary, text, caretPosition) | Given a dictionary of keywords, the user input text, and the user's caret position, find the set of matching suggestions | returns a `Promise` that resolves with an array of suggestions e.g. `["Super", "Super cool!"]` |
|typeAhead.complete(suggestion, text, caretPosition) | Given the the selected suggestion, the input text, and the user's caret position, complete the user's input with the selected suggestion | returns an object containing the text and the suggested 'replace until' position `{"text": "This is Super Cool", "pos": 18}` |
##Examples
##Example
The example code can be found in the examples folder.

@@ -92,0 +100,0 @@

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