{"id":32258426,"url":"https://github.com/binarybaba/ngprophet","last_synced_at":"2026-05-15T18:03:45.684Z","repository":{"id":58236096,"uuid":"75461978","full_name":"binarybaba/ngProphet","owner":"binarybaba","description":"A very lean AngularJS directive to display toast messages on web pages.","archived":false,"fork":false,"pushed_at":"2016-12-10T08:56:25.000Z","size":614,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-22T19:48:49.292Z","etag":null,"topics":["angularjs","callback","message","notification","notification-service","notifications","toast","toast-message","toastr"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/binarybaba.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}},"created_at":"2016-12-03T08:29:45.000Z","updated_at":"2017-05-29T14:23:27.000Z","dependencies_parsed_at":"2022-08-31T09:22:56.618Z","dependency_job_id":null,"html_url":"https://github.com/binarybaba/ngProphet","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/binarybaba/ngProphet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binarybaba%2FngProphet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binarybaba%2FngProphet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binarybaba%2FngProphet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binarybaba%2FngProphet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/binarybaba","download_url":"https://codeload.github.com/binarybaba/ngProphet/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binarybaba%2FngProphet/sbom","scorecard":{"id":238444,"data":{"date":"2025-08-11","repo":{"name":"github.com/binarybaba/ngProphet","commit":"05db335238bfdc8087ead1bf9d8d3a8972ae6b2f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/11 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-17T06:11:18.839Z","repository_id":58236096,"created_at":"2025-08-17T06:11:18.839Z","updated_at":"2025-08-17T06:11:18.839Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280503192,"owners_count":26341693,"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","status":"online","status_checked_at":"2025-10-22T02:00:06.515Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["angularjs","callback","message","notification","notification-service","notifications","toast","toast-message","toastr"],"created_at":"2025-10-22T19:48:47.773Z","updated_at":"2025-10-22T19:48:49.687Z","avatar_url":"https://github.com/binarybaba.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ngProphet\n\n[![NPM](https://nodei.co/npm/ngprophet.png?downloads=true\u0026downloadRank=true)](https://nodei.co/npm/ngprophet/)\n[![NPM](https://nodei.co/npm-dl/ngprophet.png?months=1\u0026height=3)](https://nodei.co/npm/ngprophet/)\n\nA very lean AngularJS directive to display toast messages on web pages. if you'd rather prefer a library, checkout [ProphetJS](https://www.github.com/binarybaba/prophetjs) from which ngProphet was inspired.\n\nThis project adheres to [Semantic Versioning](http://semver.org/). Sometimes I do screw up though.\n\n#### Version 1.0.0\n\n![default](https://github.com/binarybaba/prophetjs/raw/master/img/message-click-cb.gif)\n\n\n#### Table of Contents\n - [Installation](#installation)\n   - [Download](#get-the-files)\n   - [Install](#find-the-files)\n - [Usage](#api)\n   - [Simplest Display](#simplest-display)\n   - [Callback](#callback)\n   - [Options](#options)\n   - [Custom Toast Types](#custom-types)\n - [License](#license)\n\n\n## Installation\n\n### Get the files:\nChoose any of the ways to get prophet:\n\n- clone from github `git clone https://github.com/binarybaba/prophetjs.git`\n- Install from bower `bower install ngprophet --save`\n- Install from npm `npm install ngprophet --save`\n\n### Find the files\nYou'll see the files in the dist folder:\n  ```\n  dist\n  ├── css\n  │   ├── ngProphet.css\n  │   └── ngProphet.min.css\n  └── js\n      └── ngProphet.js\n ```\n### Wire it up\n Include the css and js files in your webpage:\n\n `\u003clink rel=\"stylesheet\" href=\"dist/css/prophet.min.css\"\u003e`\n\n `\u003cscript src=\"dist/js/ngProphet.js\"\u003e\u003c/script\u003e`\n \n `\u003cul class=\"prophet\"\u003e\u003c/ul\u003e`\n \n Inject the directive in your angular module\n \n `angular.module('yourApp', ['ngProphet'])`\n\n\n# API\n\nngProphet exposes a `$message` service. You should inject this service in whichever scope you need the toast messages to display. \nOptionally, ngProphet also exposes a configuration API via `$messageProvider`. If you want to customize the directive, you should do it via `$messageProvider` in Angular's configuration phase. More on that [here](#custom-types)\nOnce the configuration part of your angular module is complete, you can then inject `$message` service in the dependency injections and use it to show the toast messages.\n\nThe toast message stays for a default duration of 4000 milliseconds or until the user clicks on it. After which, the toast message is removed from the DOM.\n\n#### Simplest display\n\n```\nangular.module('yourApp',['ngProphet'])\n    .controller('someCtrl', ['$message', function($message){\n        $message.show(\"You're hella rad!\");\n    }])\n\n```\n\n#### Callback\n\nYou can also provide a callback to every toast message. The callback will be triggered after the toast message is removed automatically or\nwhen the user clicks on the toast message. The callback sends the autogenerated ID of the toast message (which can be overridden).\n\n![callback](https://github.com/binarybaba/prophetjs/raw/master/img/message-click-cb.gif)\n![no-callback](https://github.com/binarybaba/prophetjs/raw/master/img/message-default-no-click.gif)\n\n\n```\nangular.module('yourApp',['ngProphet'])\n    .controller('someCtrl', ['$message', function($message){\n        $message.show(\"You're hella rad!\", function(id){\n            //do stuff after user clicks on the toast or when the the toast goes away\n        });\n    }])\n\n```\n\n\n#### Options\n\nYou can also optionally include a set of options as a second argument (followed by the callback if any ) on every toast message. If the values are not implemented, the default values take up.\nThe following are the keys that options takes\n\n - `id`\n\t*The id is autogenerated per toast message.*\n\t - default: auto-generated\n\t - Type: number\n - `type`\n \t*Prophet has 3 presets types:* `success`, `error` *and* `default`. *You can also set more presets. Click [here](#custom-types) to see how.*\n\n \t![error](https://github.com/binarybaba/prophetjs/raw/master/img/message-error.gif)\n \t - default: `\"default\"`\n \t - Type: string\n - `duration`\n\t*The time each toast message stays on the web page before disappearing. Takes value in miliseconds.*\n\t - default: `4000`\n\t - Type: number\n\n - `class`\n \t*You can further customize the look of every toast message by providing extra CSS classes to override. Takes a single string of class names seperated by spaces.*\n \t - default: `\"\"`\n \t - Type: string\n\n ##### Example\n ```\nangular.module('yourModule',['ngProphet'])\n    .controller('someCtrl', ['$scope', '$message', function($scope, $message){\n        $message.show(\"Dexter, what's that?\", {\n            type:'success',\n            duration:8000,\n            class:'thin-border transparent-10 glass'\n            }, function(id){\n            console.log(id);\n            //do something else here after the user clicks on it\n        })        \n    }]) \n```\n\n## Custom Types\nYou can also add more presets by providing the `background-color`, `color` and `type` for more uses. Please note, all the keys are mandatory.\nAdding new presets must be done in the configuration phase of your angular application's life-cycle by triggering the ngProphet's `$messageProvider` API.  \n\n\n```\nangular.module('yourApp',['ngProphet'])\n    .config(['$messageProvider', function($messageProvider){\n        $messageProvider.types([{\n            \"type\":\"flash\",\n            \"backgroundColor\":\"grey\",\n            \"color\":\"white\"\n        }, {\n            \"type\":\"processing\",\n            \"backgroundColor\":\"#fafafa\",\n            \"color\":\"grey\"\n        }])\n        //$messageProvider.types() accepts a single object or an array of objects\n    }])\n    .controller('someCtrl', ['$scope', '$message', function($scope, $message){\n            if($scope.processing) $message.show(\"Processing your transaction...\", {type:'processing'})\n            else $message.show('Done!', {duration:10000, type:\"success\"})\n    }])\n            \n```\n\n![stackUp](https://github.com/binarybaba/prophetjs/raw/master/img/message-stack-up.gif)\n\n\n#### License\nOpen source under the [MIT License](https://github.com/binarybaba/prophetjs/blob/master/LICENSE).\nAll rights reserved.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinarybaba%2Fngprophet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbinarybaba%2Fngprophet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinarybaba%2Fngprophet/lists"}