Security News
NIST Misses 2024 Deadline to Clear NVD Backlog
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
knockout.typeahead
Advanced tools
#Knockout Typeahead Binding
Simple knockout binding which wraps Twitter typeahead.js
##Installation
npm install knockout.typeahead
##Usage
Include in your bundle with browserify or webpack. You will need to have a loader configured for less files in order to get styling from the included stylesheet, or you can bring your own.
<input data-bind="value: myValue, typeahead: autocompleteMyValue" />
with a view model that looks like this:
function ViewModel() {
this.myValue = ko.observable();
this.autocompleteMyValue = '/my/server/url?value=%QUERY';
}
If the remote endpoint you are querying is returning a complex object instead of an array of suggestions, you can pass a remoteFilter
parameter to the binding, a function on your view model which returns the portion of the response object containing the array of suggestions.
If you are returning complex objects as suggestions, pass a templateName
into the binding to use a custom template.
<input data-bind="value: myValue, typeahead: autocompleteMyValue, remoteFilter: pluckResults, templateName: 'my-suggestion-template'" />
Clone the repository then npm i && npm run start
to build the example.
##Additional Binding Options
mappingFunction
: Function on your model which will map the suggestion data returned from your queries (e.g. so you can use computed observables and extenders in your template)displayKey
: Property name on complex object suggestion data which will be used to populate the hint/value of the typeahead input.FAQs
Simple knockout binding which wraps Twitter typeahead.js
The npm package knockout.typeahead receives a total of 2 weekly downloads. As such, knockout.typeahead popularity was classified as not popular.
We found that knockout.typeahead demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers 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
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.