{"id":22871518,"url":"https://github.com/opensly/sly-utils","last_synced_at":"2026-03-11T17:34:20.460Z","repository":{"id":60821620,"uuid":"542595850","full_name":"opensly/sly-utils","owner":"opensly","description":"sly-utils is a modular and efficient JavaScript utility library designed to simplify complex tasks.","archived":false,"fork":false,"pushed_at":"2025-06-19T11:50:26.000Z","size":126,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-19T11:50:41.872Z","etag":null,"topics":["es6-javascript","javascript","library","modular","utility","utility-library","utils"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opensly.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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,"zenodo":null},"funding":{"custom":["https://www.paypal.com/paypalme/LakshmikanthV"]}},"created_at":"2022-09-28T13:08:45.000Z","updated_at":"2025-06-19T11:49:36.000Z","dependencies_parsed_at":"2022-10-05T08:50:18.278Z","dependency_job_id":"98b6ef1b-d22d-4ff8-8d90-524e0e588a13","html_url":"https://github.com/opensly/sly-utils","commit_stats":null,"previous_names":["otherdash/otherdash"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/opensly/sly-utils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensly%2Fsly-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensly%2Fsly-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensly%2Fsly-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensly%2Fsly-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opensly","download_url":"https://codeload.github.com/opensly/sly-utils/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensly%2Fsly-utils/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263182156,"owners_count":23426627,"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":["es6-javascript","javascript","library","modular","utility","utility-library","utils"],"created_at":"2024-12-13T13:19:38.096Z","updated_at":"2026-03-11T17:34:20.433Z","avatar_url":"https://github.com/opensly.png","language":"TypeScript","funding_links":["https://www.paypal.com/paypalme/LakshmikanthV","https://www.paypal.me/LakshmikanthV"],"categories":[],"sub_categories":[],"readme":"# sly-utils\n\nsly-utils is a modular and efficient JavaScript utility library designed to simplify complex tasks.\n\n## Installation\n\n```bash\nnpm install sly-utils\n```\n\n## Usage\n\n### In JavaScript\n```js\n// ES Module\nimport { chunk, camelToSnake, uuid } from 'sly-utils';\n\nconst arr = [1, 2, 3, 4, 5, 6];\nconsole.log(chunk(arr, 2)); // [[1,2],[3,4],[5,6]]\nconsole.log(camelToSnake('helloWorld')); // 'hello_world'\nconsole.log(uuid()); // 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'\n```\n\n### In TypeScript\n```ts\nimport { chunk, camelToSnake, uuid } from 'sly-utils';\n// TypeScript will provide type checking and autocompletion\n```\n\n## Exports \u0026 Structure\n- All utilities are available as named exports from the main package entry.\n- TypeScript types are included automatically for all utilities.\n- The package supports ES Module imports.\n\n## List of Utility Methods\n\n- Compare strings (compute the Levenshtein distance between two strings)\n- Convert map to json\n- Convert json to map\n- Deep freeze a nested object\n- Escape HTML tags as HTML entities\n- Flatten a nested object\n- Generate UUID \u0026 UUIDShort\n- Strip HTML tags\n- Transform keys\n- Transform URL strings to SEO-friendly URLs\n\n### Utility Methods for Array \u0026 Array of Objects\n\n- Check if two given arrays are the same\n- Chunk an array\n- Find the common elements of two arrays\n- Find if a given string exists in an array of objects\n- Group by array of objects\n- Move an element in an array from one position to another\n- Pluck values from an array of objects\n- Remove duplicates from an array of objects\n- Shuffle an array\n- Sort an array of objects\n\n### Utility Methods for String Conversion\n\n- Camel case to snake case\n- Camel case to kebab case\n- Camel case to Pascal case\n- Kebab case to snake case\n- Kebab case to camel case\n- Kebab case to Pascal case\n- Pascal case to camel case\n- Pascal case to kebab case\n- Pascal case to snake case\n- Snake case to camel case\n- Snake case to Pascal case\n- Snake case to kebab case\n\n## Build \u0026 Type Support\n- The package includes pre-built JavaScript bundles for both CommonJS and ES Module consumers.\n- TypeScript declaration files are included for full type safety and autocompletion.\n- No additional configuration is needed for most modern build tools.\n\n## Report \u0026 Contribute\n\nSly-utils is currently in active development and fine-tuning.\nIf you encounter any issues, please open a [GitHub issue](https://github.com/opensly/sly-utils/issues).\nIf you would like to contribute, please open a [GitHub Pull Request](https://github.com/opensly/sly-utils/pulls).\n\n## Support\n\nYour support inspires \u0026 encourage us more. If you are interested to make a donation to us, please click the below PayPal button.\n\n[![PayPal.me](https://img.shields.io/badge/paypal-donate-119fde.svg)](https://www.paypal.me/LakshmikanthV)\n\n## Author\n\n[OpenSly](https://github.com/opensly)\n\n## License\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopensly%2Fsly-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopensly%2Fsly-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopensly%2Fsly-utils/lists"}