Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
complety
Advanced tools
Changelog
v0.6.0
Readme
Complety is a plugin that generates an autocomplete.
Attribute | Default | Description |
---|---|---|
cache | true | enables cache |
cacheData | {} | keeps json results on keys represented by the request url |
delay | 300 | time in milliseconds to delay the search after user typing |
functions.getValue | undefined | function to choose which attribute of json to use on search |
keys | undefined | keys of json that will be highlighted |
minChars | 1 | minimum of chars typed to trigger the search |
params | {} | literal or function params sent to query |
suggestion | undefined | an initial suggestion to be shown |
templates.none | undefined | compiled template used to render suggestion of no results |
templates.search | undefined | compiled template used to render suggestion |
url | undefined | search url |
wrappers.field | '.complety__field' | class used on field |
wrappers.item | '.complety__item' | class used suggestion items |
wrappers.itemSelected | '.complety__item--selected' | class used on selected item of suggestion |
wrappers.list | '.complety__list' | class used on suggestions list |
wrappers.loading | '.complety__field--loading' | class used on field during search |
wrappers.none | '.complety__none' | class used on item that show no result message |
wrappers.wrapper | '.complety' | class used on complety wrapper |
You declare an element with optional data atributes:
<input data-url="/update" type="search">
On JS you can declare attributes too, but data attributes has priority:
$('input').complety({ keys: ['name'] });
Methods | Description |
---|---|
complety.abort() | aborts all pending requests |
complety.hide() | hides the last suggestions |
complety.loader('start | stop') |
complety.readonly(true | false) |
complety.search('value') | executes a search |
complety.show() | show the last suggestions |
complety.suggest(json) | suggest a json result |
complety.suggestion() | returns the selected suggestion |
complety.suggestions() | returns suggestions from the last search |
complety.url() | returns the actual builded url |
complety.wrappers() | returns the wrappers name |
Events | Description |
---|---|
complety:always | when ajax executes always callback. arguments: json, this |
complety:fail | when ajax executes fail callback. arguments: json, this |
complety:done | when ajax executes done callback. arguments: json, this |
complety:suggested | when some suggestion is displayed: suggestion, this |
complety:none | when no suggestion result is displayed: arguments: value, this |
FAQs
Complety - An Auto Complete Plugin
The npm package complety receives a total of 14 weekly downloads. As such, complety popularity was classified as not popular.
We found that complety 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.