{"id":26665930,"url":"https://github.com/josunlp/simple-toast-messages","last_synced_at":"2025-04-11T22:07:54.318Z","repository":{"id":58268374,"uuid":"529987345","full_name":"JosunLP/simple-toast-messages","owner":"JosunLP","description":"A simple TypeScript package that builds up a toast system.","archived":false,"fork":false,"pushed_at":"2024-10-30T13:36:30.000Z","size":123,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-11T22:07:44.676Z","etag":null,"topics":["error-handling","messaging","toast","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/simple-toast-messages","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/JosunLP.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":"2022-08-28T21:46:54.000Z","updated_at":"2024-10-30T13:34:34.000Z","dependencies_parsed_at":"2024-10-30T14:29:44.184Z","dependency_job_id":"7e7cfe26-eadb-4303-9617-7b13b1e8434d","html_url":"https://github.com/JosunLP/simple-toast-messages","commit_stats":{"total_commits":8,"total_committers":1,"mean_commits":8.0,"dds":0.0,"last_synced_commit":"fe2aac6fa7425a69dd5adfe6a9a5da86bc5413f8"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JosunLP%2Fsimple-toast-messages","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JosunLP%2Fsimple-toast-messages/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JosunLP%2Fsimple-toast-messages/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JosunLP%2Fsimple-toast-messages/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JosunLP","download_url":"https://codeload.github.com/JosunLP/simple-toast-messages/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248487713,"owners_count":21112191,"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":["error-handling","messaging","toast","typescript"],"created_at":"2025-03-25T17:51:31.000Z","updated_at":"2025-04-11T22:07:54.290Z","avatar_url":"https://github.com/JosunLP.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# simple-toast-messages\n\n[![npm version](https://img.shields.io/npm/v/simple-toast-messages?style=for-the-badge)](https://www.npmjs.com/package/simple-toast-messages)\n[![GitHub issues](https://img.shields.io/github/issues/josunlp/simple-toast-messages?style=for-the-badge)](https://github.com/josunlp/simple-toast-messages/issues)\n[![GitHub forks](https://img.shields.io/github/forks/josunlp/simple-toast-messages?style=for-the-badge)](https://github.com/josunlp/simple-toast-messages/network)\n[![GitHub stars](https://img.shields.io/github/stars/josunlp/simple-toast-messages?style=for-the-badge)](https://github.com/josunlp/simple-toast-messages/stargazers)\n[![GitHub license](https://img.shields.io/github/license/josunlp/simple-toast-messages?style=for-the-badge)](https://github.com/josunlp/simple-toast-messages/blob/master/LICENSE)\n![npm](https://img.shields.io/npm/dt/simple-toast-messages?style=for-the-badge)\n[![CodeFactor](https://www.codefactor.io/repository/github/josunlp/simple-toast-messages/badge?style=for-the-badge)](https://www.codefactor.io/repository/github/josunlp/simple-toast-messages)\n[![TypeScript](https://img.shields.io/badge/Developed%20in-TypeScript-blue?logo=typescript\u0026style=for-the-badge)](https://www.typescriptlang.org/)\n\nA simple TypeScript package that builds up a toast messaging system.\n\n## Installation\n\n```bash\nnpm install simple-toast-messages\n```\n\n## Usage\n\n### Possible Imports\n\n```typescript\n// default import\nimport SimpleToastMessages from 'simple-toast-messages';\n\n// named imports\nimport { SimpleToastMessages, stm, T, PositionEnum } from 'simple-toast-messages';\n```\n\n---\n\n### Example\n\n```typescript\n// get the instance\nconst msg = SimpleToastMessages.getInstance();\n\n// fire a success message with a timeout of 1 second and position top left\nmsg.success(message, {\n  timeOut: 1000,\n  position: PositionEnum.TOP_LEFT,\n});\n\n// fire a simple error message\nmsg.error(message);\n\n// fire a info message with a timeout of 3 seconds and position bottom left\nmsg.info(message, {\n  timeOut: 3000,\n  position: PositionEnum.BOTTOM_LEFT,\n  opacity: 0.8,\n});\n\n// fire a warning message with a timeout of 5 seconds and position bottom center\nmsg.warning(message, {\n  timeOut: 5000,\n  position: PositionEnum.BOTTOM_CENTER,\n  opacity: 0.8,\n});\n```\n\n![Example](assets/images/example-1.png)\n![Example](assets/images/example-2.png)\n![Example](assets/images/example-3.png)\n![Example](assets/images/example-4.png)\n\n## License\n\n[MIT](https://opensource.org/licenses/MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosunlp%2Fsimple-toast-messages","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjosunlp%2Fsimple-toast-messages","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosunlp%2Fsimple-toast-messages/lists"}