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

@neovici/cosmoz-autocomplete

Package Overview
Dependencies
Maintainers
4
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@neovici/cosmoz-autocomplete - npm Package Compare versions

Comparing version 7.5.1 to 7.6.0

2

dist/autocomplete/use-autocomplete.js

@@ -10,3 +10,3 @@ import { useCallback, useMemo, useEffect } from 'haunted';

export const useAutocomplete = ({ value: _value, text, onChange: _onChange, onText: _onText, onSelect, limit, source, textProperty, textual: _textual, valueProperty, external, hideEmpty, keepOpened, keepQuery, ...thru }) => {
const textual = useMemo(() => (_textual ?? strProp)(textProperty), [_textual, textProperty]), { active, focused, onFocus, setClosed } = useFocus(thru), empty = !text, query = useMemo(() => text?.trim().toLowerCase(), [text]), host = useHost(), onText = useNotify(host, _onText, 'text'), onChange = useCallback((val) => {
const textual = useMemo(() => (_textual ?? strProp)(textProperty), [_textual, textProperty]), { active, focused, onFocus, setClosed } = useFocus(thru), empty = !text, query = useMemo(() => text?.trim(), [text]), host = useHost(), onText = useNotify(host, _onText, 'text'), onChange = useCallback((val) => {
_onChange?.(val, () => setClosed(true));

@@ -13,0 +13,0 @@ notify(host, 'value', val);

import { useCallback } from 'haunted';
export const search = (source, query, textual) => {
const qry = query.toLowerCase();
const matches = [];
for (const item of source) {
const index = textual(item).toLowerCase().indexOf(query);
const index = textual(item).toLowerCase().indexOf(qry);
if (index < 0) {

@@ -7,0 +8,0 @@ continue;

{
"name": "@neovici/cosmoz-autocomplete",
"version": "7.5.1",
"version": "7.6.0",
"description": "A autocomplete input web component",

@@ -5,0 +5,0 @@ "keywords": [

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