{"id":15905773,"url":"https://github.com/jinhduong/lazee","last_synced_at":"2025-04-02T21:18:15.137Z","repository":{"id":143973142,"uuid":"139006562","full_name":"jinhduong/lazee","owner":"jinhduong","description":"💨 The simple, lightweight, Google search like and pure javascript auto-complete ","archived":false,"fork":false,"pushed_at":"2018-07-01T06:42:32.000Z","size":193,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-13T13:23:18.631Z","etag":null,"topics":["autocomplete","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jinhduong.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-28T11:00:56.000Z","updated_at":"2018-07-01T09:15:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"c7fcfff9-d44e-4720-a78d-ae8646c70703","html_url":"https://github.com/jinhduong/lazee","commit_stats":{"total_commits":14,"total_committers":1,"mean_commits":14.0,"dds":0.0,"last_synced_commit":"f4e1114c39bd2a9e90f00e4e0940ef7eca7dcee6"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jinhduong%2Flazee","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jinhduong%2Flazee/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jinhduong%2Flazee/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jinhduong%2Flazee/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jinhduong","download_url":"https://codeload.github.com/jinhduong/lazee/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246892845,"owners_count":20850850,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autocomplete","typescript"],"created_at":"2024-10-06T13:08:32.653Z","updated_at":"2025-04-02T21:18:15.113Z","avatar_url":"https://github.com/jinhduong.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lazee\r\n💨 The simple, lightweight, Google search like and pure javascript auto-complete.\r\n\r\n- Only `3kb` script, `1kb` css\r\n- Easy to implement and modify\r\n- Google like desgin\r\n\r\n[![Build Status](https://travis-ci.org/jinhduong/lazee.svg?branch=master)](https://travis-ci.org/jinhduong/lazee)\r\n\r\n![lazee](https://i.imgur.com/ECyhlpu.gif)\r\n\r\nDownload lastest build at `dist` folder.\r\n\r\n## Usage\r\n```html\r\n\u003chtml\u003e\r\n\u003clink rel=\"stylesheet\" href=\"./src/lazee.css\"\u003e\r\n\u003cbody\u003e\r\n    \u003cdiv id=\"autocomplete\"\u003e\u003c/div\u003e\r\n\u003c/body\u003e\r\n\u003c/html\u003e\r\n\u003cscript src=\"./src/lazee.js\"\u003e\u003c/script\u003e\r\n\u003cscript\u003e\r\n    var $autoComplete = new Lazee('#autocomplete', {\r\n        debounceTime: 200,\r\n        getData: function (searchingValue) {\r\n            return fetch('https://jsonplaceholder.typicode.com/users')\r\n                .then(data =\u003e data.json())\r\n                .then(data =\u003e {\r\n                    return data.filter(x =\u003e x.name.includes(searchingValue));\r\n                });\r\n        },\r\n        displayProp: 'name'\r\n    });\r\n\u003c/script\u003e\r\n```\r\n\r\n## Configs\r\nAll of config types in `models/*` folder.\r\n### LazeeConfig\r\n```ts\r\nexport interface LazeeConfig {\r\n    debounceTime?: number;\r\n    onfocus?: (currentElem: Element) =\u003e void;\r\n    outfocus?: (currentElem: Element) =\u003e void;\r\n    /**\r\n     * When user typing value into input\r\n     */\r\n    typing?: (value: any, event: KeyboardEvent) =\u003e void;\r\n    /**\r\n     * When user press enter\r\n     */\r\n    enter?: (value: any, event: KeyboardEvent) =\u003e void;\r\n    /**\r\n     * Give searchingValue then receive a result (maybe is promise) \r\n     */\r\n    getData?: (searchingValue: any) =\u003e Promise\u003cany[]\u003e | any[];\r\n    /**\r\n     * Property that will display to autocomplete, default is string item\r\n     * And display itself\r\n     */\r\n    displayProp?: string;\r\n    /**\r\n     * When user click into suggestion items\r\n     */\r\n    itemClick?: (item: any) =\u003e void;\r\n    /**\r\n     * Search method will be called after the lenght of world \u003e= this value\r\n     */\r\n    wordLen?: number;\r\n}\r\n```\r\n### Lazee Object\r\n```ts\r\nexport interface LazeeReturnObject {\r\n    /**\r\n     * Return current value\r\n     */\r\n    value: () =\u003e any;\r\n    /**\r\n     * Return current item\r\n     */\r\n    item: () =\u003e any;\r\n}\r\n```\r\n\r\n## Library files\r\nThis library written by `Typescript`, `SCSS` and use `Rollup` for bunder.\r\n\r\n- `src/lazee.ts`: Source\r\n- `src/lazee.scss`: Styles\r\n\r\n### Build \r\n```sh\r\nnpm run build\r\n```\r\n\r\n### Dev mode\r\n```sh\r\nnpm run dev\r\nnpm run scss\r\nnpm run rollup\r\n```\r\n\r\n---\r\n\r\nLicensed under [MIT](http://amsul.ca/MIT)\r\n\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjinhduong%2Flazee","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjinhduong%2Flazee","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjinhduong%2Flazee/lists"}