
Security News
Knip Hits 500 Releases with v5.62.0, Improving TypeScript Config Detection and Plugin Integrations
Knip hits 500 releases with v5.62.0, refining TypeScript config detection and updating plugins as monthly npm downloads approach 12M.
autocomplete-element
Advanced tools
Wire up autocomplete for an <input type="text">
element.
Auto-complete the months.
var auto = require('autocomplete-element');
var input = document.querySelector('input');
var months = [
"January", "February", "March", "April", "May", "June", "July",
"August", "September", "October", "November", "December"
];
auto(input, function (c) {
if (!input.value.length) return c.suggest([]);
var matches = months.filter(function (m) {
return lc(m.slice(0, input.value.length)) === lc(input.value);
});
c.suggest(matches);
});
function lc (x) { return x.toLowerCase() }
var c = auto(input, fn)
Create a new autocomplete instance c
that wraps an input
element and
optionally sets up a keydown listener fn
.
fn(c, ev)
fires when there is new text input to deal with.
Auto-complete an array of suggestions
. The first suggestion in the array is
shadowed under the active text.
Set the value for the input text and the shadow text.
With npm do:
npm install autocomplete-element
MIT
FAQs
autocomplete for elements
The npm package autocomplete-element receives a total of 194 weekly downloads. As such, autocomplete-element popularity was classified as not popular.
We found that autocomplete-element demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Knip hits 500 releases with v5.62.0, refining TypeScript config detection and updating plugins as monthly npm downloads approach 12M.
Security News
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.