{"id":25619391,"url":"https://github.com/arxcode40/cookie-js","last_synced_at":"2025-02-22T06:17:20.978Z","repository":{"id":276422492,"uuid":"928748858","full_name":"arxcode40/cookie-js","owner":"arxcode40","description":"Document cookie management library inspired by CodeIgniter Cookie","archived":false,"fork":false,"pushed_at":"2025-02-08T05:21:20.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-08T06:20:25.209Z","etag":null,"topics":["document-cookie","javascript","javascript-library"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/arxcode40.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-07T06:59:51.000Z","updated_at":"2025-02-08T05:21:23.000Z","dependencies_parsed_at":"2025-02-08T06:20:29.039Z","dependency_job_id":"85c7ce7f-c2c3-43c1-a778-8aab6a261dab","html_url":"https://github.com/arxcode40/cookie-js","commit_stats":null,"previous_names":["arxcode40/cookie-js"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arxcode40%2Fcookie-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arxcode40%2Fcookie-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arxcode40%2Fcookie-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arxcode40%2Fcookie-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arxcode40","download_url":"https://codeload.github.com/arxcode40/cookie-js/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240131687,"owners_count":19752727,"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":["document-cookie","javascript","javascript-library"],"created_at":"2025-02-22T06:17:20.400Z","updated_at":"2025-02-22T06:17:20.967Z","avatar_url":"https://github.com/arxcode40.png","language":"JavaScript","readme":"# Document Cookie JS\n\n## Introduction\nDocument cookie management library inspired by CodeIgniter Cookie\n\n## Installation\n- Download: [cookie.min.js](https://raw.github.com/arxcode40/cookie-js/main/dist/cookie.min.js)\n- Include into your project\n    ```html\n    \u003cscript src=\"cookie.min.js\"\u003e\u003c/script\u003e\n    ```\n\n## Available Functions\n### Set a cookie\n```javascript\ncookie.set(name, value, options = {})\n```\n#### Parameters\n- **name** (`string`) – Cookie name\n- **value** (`string`) – Cookie value\n- **options** (`object`) – Cookie options (optional)\n  - **domain** (`string`) – Cookie domain (usually: .yourdomain.com)\n  - **expire** (`number`) – Number of seconds until expiration. If set to 0 the cookie will only last as long as the browser is open (default: 0)\n  - **httpOnly** (`boolean`) – Whether to hide the cookie from JavaScript (default: false)\n  - **maxAge** (`number`) – Cookie maximum age\n  - **partitioned** (`boolean`) – Indicates that the cookie should be stored using partitioned storage (default: false)\n  - **path** (`string`) – Cookie path (default: '/')\n  - **sameSite** (`string`) – The value for the SameSite cookie parameter\n  - **secure** (`boolean`) – Whether to only send the cookie through HTTPS (default: false)\n#### Return type\n`void`\n\n### Get a cookie\n```javascript\ncookie.get(name)\n```\n#### Parameters\n- **name** (`string`) – Cookie name\n#### Returns\nThe cookie value or null if not found\n#### Return type\n`any`\n\n### Delete a cookie\n```javascript\ncookie.delete(name, options = {})\n```\n#### Parameters\n- **name** (`string`) – Cookie name\n- **options** (`object`) – Cookie options (optional)\n  - **domain** (`string`) – Cookie domain (usually: .yourdomain.com)\n  - **path** (`string`) – Cookie path (default: '/')\n#### Return type\n`void`\n\n### Checks if a cookie exists\n```javascript\ncookie.has(name, ?value = null)\n```\n#### Parameters\n- **name** (`string`) – Cookie name\n- **value** (`string|null`) – Cookie value (optional)\n#### Return type\n`boolean`","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farxcode40%2Fcookie-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farxcode40%2Fcookie-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farxcode40%2Fcookie-js/lists"}