{"id":26590364,"url":"https://github.com/smooai/utils","last_synced_at":"2025-03-23T13:38:20.983Z","repository":{"id":280721343,"uuid":"929895936","full_name":"SmooAI/utils","owner":"SmooAI","description":"A collection of shared utilities and tools used across SmooAI projects. This package provides common functionality to standardize and simplify development across all SmooAI repositories.","archived":false,"fork":false,"pushed_at":"2025-03-10T02:33:02.000Z","size":334,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-13T09:33:37.797Z","etag":null,"topics":["utilities"],"latest_commit_sha":null,"homepage":"https://smoo.ai","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/SmooAI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2025-02-09T16:48:26.000Z","updated_at":"2025-03-10T02:33:05.000Z","dependencies_parsed_at":"2025-03-05T00:38:26.208Z","dependency_job_id":null,"html_url":"https://github.com/SmooAI/utils","commit_stats":null,"previous_names":["smooai/utils"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SmooAI%2Futils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SmooAI%2Futils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SmooAI%2Futils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SmooAI%2Futils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SmooAI","download_url":"https://codeload.github.com/SmooAI/utils/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245110773,"owners_count":20562440,"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":["utilities"],"created_at":"2025-03-23T13:38:20.432Z","updated_at":"2025-03-23T13:38:20.963Z","avatar_url":"https://github.com/SmooAI.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- Improved compatibility of back to top link: See: https://github.com/othneildrew/Best-README-Template/pull/73 --\u003e\n\n\u003ca name=\"readme-top\"\u003e\u003c/a\u003e\n\n\u003c!--\n*** Thanks for checking out the Best-README-Template. If you have a suggestion\n*** that would make this better, please fork the repo and create a pull request\n*** or simply open an issue with the tag \"enhancement\".\n*** Don't forget to give the project a star!\n*** Thanks again! Now go create something AMAZING! :D\n--\u003e\n\n\u003c!-- PROJECT SHIELDS --\u003e\n\u003c!--\n*** I'm using markdown \"reference style\" links for readability.\n*** Reference links are enclosed in brackets [ ] instead of parentheses ( ).\n*** See the bottom of this document for the declaration of the reference variables\n*** for contributors-url, forks-url, etc. This is an optional, concise syntax you may use.\n*** https://www.markdownguide.org/basic-syntax/#reference-style-links\n--\u003e\n\n\u003c!-- PROJECT LOGO --\u003e\n\u003cbr /\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://smoo.ai\"\u003e\n    \u003cimg src=\"images/logo.png\" alt=\"SmooAI Logo\" /\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n\u003c!-- ABOUT THE PROJECT --\u003e\n\n## About SmooAI\n\nSmooAI is an AI-powered platform for helping businesses multiply their customer, employee, and developer experience.\n\nLearn more on [smoo.ai](https://smoo.ai)\n\n## SmooAI Packages\n\nCheck out other SmooAI packages at [npmjs.com/org/smooai](https://www.npmjs.com/org/smooai)\n\n## About @smooai/utils\n\nA collection of shared utilities and tools used across SmooAI projects. This package provides common functionality to standardize and simplify development across all SmooAI repositories.\n\n![NPM Version](https://img.shields.io/npm/v/%40smooai%2Futils?style=for-the-badge)\n![NPM Downloads](https://img.shields.io/npm/dw/%40smooai%2Futils?style=for-the-badge)\n![NPM Last Update](https://img.shields.io/npm/last-update/%40smooai%2Futils?style=for-the-badge)\n\n![GitHub License](https://img.shields.io/github/license/SmooAI/utils?style=for-the-badge)\n![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/SmooAI/utils/release.yml?style=for-the-badge)\n![GitHub Repo stars](https://img.shields.io/github/stars/SmooAI/utils?style=for-the-badge)\n\n### Installation\n\n```sh\npnpm add @smooai/utils\n```\n\n### Available Utilities\n\n#### API Handling\n\n- `ApiError` - Custom error class for handling API-specific errors with status codes\n- `apiHandler` - Lambda function wrapper for standardized API error handling and responses\n- `createAwsLambdaHonoApp` - Factory for creating Hono apps configured for AWS Lambda\n\n#### Collections\n\n- `CaseInsensitiveMap` - Map implementation with case-insensitive string keys\n- `CaseInsensitiveSet` - Set implementation with case-insensitive string values\n\n#### Error Handling\n\n- `errorHandler` - Generic error handler with logging and type-specific error processing\n\n#### File Operations\n\n- `findFile` - Async utility to find files in parent directories\n- `findFileSync` - Synchronous version of findFile\n\n#### Environment\n\n- `isRunningLocally` - Check if code is running in local development\n- `isRunningInProd` - Check if code is running in production\n\n#### Data Validation\n\n- `validateAndTransformPhoneNumber` - Zod validator for phone numbers with E.164 formatting\n\n#### Utilities\n\n- `sleep` - Promise-based delay function\n\n### Features\n\n- AWS Lambda integration\n- Standardized error handling\n- Case-insensitive collections\n- File system utilities\n- Environment detection\n- Data validation tools\n- HTTP request handling with Hono\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n### Testing\n\n```sh\npnpm test\n```\n\n### Linting\n\n```sh\npnpm lint\n```\n\n## Contributing\n\nWe're currently developing our contribution processes. If you're interested in contributing to this package or have questions, please reach out to us through the contact information below.\n\n\u003c!-- CONTACT --\u003e\n\n## Contact\n\nBrent Rager - [Email](mailto:brent@smoo.ai)\n[Instagram](https://www.instagram.com/brentragertech/)\n[LinkedIn](https://www.linkedin.com/in/brentrager/)\n[Threads](https://www.threads.net/@brentragertech)\n\nSmoo Github: [https://github.com/SmooAI](https://github.com/SmooAI)\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!-- MARKDOWN LINKS \u0026 IMAGES --\u003e\n\u003c!-- https://www.markdownguide.org/basic-syntax/#reference-style-links --\u003e\n\n[sst.dev-url]: https://reactjs.org/\n[sst]: https://img.shields.io/badge/sst-EDE1DA?style=for-the-badge\u0026logo=sst\u0026logoColor=E27152\n[sst-url]: https://sst.dev/\n[next]: https://img.shields.io/badge/next.js-000000?style=for-the-badge\u0026logo=nextdotjs\u0026logoColor=white\n[next-url]: https://nextjs.org/\n[aws]: https://img.shields.io/badge/aws-232F3E?style=for-the-badge\u0026logo=amazonaws\u0026logoColor=white\n[aws-url]: https://tailwindcss.com/\n[tailwindcss]: https://img.shields.io/badge/tailwind%20css-0B1120?style=for-the-badge\u0026logo=tailwindcss\u0026logoColor=#06B6D4\n[tailwindcss-url]: https://tailwindcss.com/\n[zod]: https://img.shields.io/badge/zod-3E67B1?style=for-the-badge\u0026logoColor=3E67B1\n[zod-url]: https://zod.dev/\n[sanity]: https://img.shields.io/badge/sanity-F36458?style=for-the-badge\n[sanity-url]: https://www.sanity.io/\n[vitest]: https://img.shields.io/badge/vitest-1E1E20?style=for-the-badge\u0026logo=vitest\u0026logoColor=#6E9F18\n[vitest-url]: https://vitest.dev/\n[pnpm]: https://img.shields.io/badge/pnpm-F69220?style=for-the-badge\u0026logo=pnpm\u0026logoColor=white\n[pnpm-url]: https://pnpm.io/\n[turborepo]: https://img.shields.io/badge/turborepo-000000?style=for-the-badge\u0026logo=turborepo\u0026logoColor=#EF4444\n[turborepo-url]: https://turbo.build/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmooai%2Futils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmooai%2Futils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmooai%2Futils/lists"}