Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
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 1 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
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.