{"id":18510776,"url":"https://github.com/envato/cookie-consent","last_synced_at":"2025-04-09T04:33:22.833Z","repository":{"id":34240571,"uuid":"171792023","full_name":"envato/cookie-consent","owner":"envato","description":"Some helper functions to deal with cookie-consent","archived":false,"fork":false,"pushed_at":"2024-05-01T15:59:29.000Z","size":324,"stargazers_count":11,"open_issues_count":1,"forks_count":2,"subscribers_count":46,"default_branch":"main","last_synced_at":"2024-05-02T11:32:58.405Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/envato.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2019-02-21T03:16:43.000Z","updated_at":"2024-05-30T04:09:49.780Z","dependencies_parsed_at":"2023-01-15T05:32:05.862Z","dependency_job_id":"c8ec2f05-7f16-4d64-bf45-8692b33ccfb8","html_url":"https://github.com/envato/cookie-consent","commit_stats":{"total_commits":53,"total_committers":8,"mean_commits":6.625,"dds":0.7735849056603774,"last_synced_commit":"2b7554ee69f81cf212d2f6a239a55d8f4910666a"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/envato%2Fcookie-consent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/envato%2Fcookie-consent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/envato%2Fcookie-consent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/envato%2Fcookie-consent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/envato","download_url":"https://codeload.github.com/envato/cookie-consent/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223319262,"owners_count":17125840,"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":[],"created_at":"2024-11-06T15:25:04.201Z","updated_at":"2024-11-06T15:25:05.553Z","avatar_url":"https://github.com/envato.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cookie-consent\n\n## Overview\n\nThe npm package for cookie consent helpers. These functions are tighly coupled to using the cookiebot api at the moment.\n\n## Usage\n\n### Installation\n\n```sh\nnpm install @envato/cookie-consent --save\n# or using `yarn`\nyarn add @envato/cookie-consent\n```\n\n### Examples\n\n```js\nimport { Consent, consented, deferRun } from '@envato/cookie-consent'\n\n// Check for consent inline (note that on the initial page load this function may return false)\nif (consented(Consent.statistics)) {\n  // Do something..\n}\n\n// Manually parse and check the consent type in the CookieConsent cookie\ncheckCookieConsent(Cookies.get('CookieConsent'), Consent.statistics)\n\n// Run function after consent\ndeferRun(() =\u003e {\n  doSomething()\n}, Consent.marketing)\n\n// Types of consent we support:\nConsent.marketing\nConsent.statistics\nConsent.preferences\nConsent.necessary\n```\n\n### Override CSS\n\nThere is a `cookiebot.css` in the module, you can include it to partially override the default Cookiebot style.\n\n## Publishing\n\nPublishing is automated via GitHub Actions. Trigger with the following steps:\n\n1. Ensure the latest version is committed in the `package.json`. eg. `\"version\": \"1.1.1\"`\n1. Ensure the latest version is tagged from `main`. eg. `git tag v1.1.1 \u0026\u0026 git push origin v1.1.1`\n1. Create a release via the [Github Releases](https://github.com/envato/cookie-consent/releases)\n1. Verify the build in [Github Actions](https://github.com/envato/cookie-consent/actions)\n1. Verify the package published to [Github Packages](https://github.com/envato/cookie-consent/pkgs/npm/cookie-consent)\n1. Verify the package published to [NPM](https://www.npmjs.com/package/@envato/cookie-consent?activeTab=versions)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenvato%2Fcookie-consent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fenvato%2Fcookie-consent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenvato%2Fcookie-consent/lists"}