{"id":19273798,"url":"https://github.com/delfimov/js-cookie","last_synced_at":"2025-04-21T22:33:14.756Z","repository":{"id":2527996,"uuid":"3504412","full_name":"delfimov/JS-Cookie","owner":"delfimov","description":"Javascript cookie library","archived":false,"fork":false,"pushed_at":"2017-07-31T14:21:58.000Z","size":6,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-14T20:18:52.977Z","etag":null,"topics":["cookie","cookies","javascript","javascript-cookie-library","js-cookie","vanilla-javascript"],"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/delfimov.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}},"created_at":"2012-02-21T14:12:37.000Z","updated_at":"2021-03-19T09:07:06.000Z","dependencies_parsed_at":"2022-07-21T11:33:01.979Z","dependency_job_id":null,"html_url":"https://github.com/delfimov/JS-Cookie","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delfimov%2FJS-Cookie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delfimov%2FJS-Cookie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delfimov%2FJS-Cookie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delfimov%2FJS-Cookie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/delfimov","download_url":"https://codeload.github.com/delfimov/JS-Cookie/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250145137,"owners_count":21382356,"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":["cookie","cookies","javascript","javascript-cookie-library","js-cookie","vanilla-javascript"],"created_at":"2024-11-09T20:44:09.333Z","updated_at":"2025-04-21T22:33:09.741Z","avatar_url":"https://github.com/delfimov.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JS-Cookie\n\nJavascript Cookie library\n\n## Install\n\n```\nnpm install js_cookie\n```\n\n## Usage\n\n```javascript\nvalue = cookie.get(name);\n```\n\n`name` - cookie name\n\nreturns cookie value or null if not set\n\n\n```javascript\ncookie.set(name, value, expires, path, domain, secure);\n```\n\n`name` - cookie name\n\n`value` - string value\n\n`expires` - days before expire. If omitted, the cookie will expire at the end of the session (when the browser closes). \n\n`path` - The path on the server in which the cookie will be available on. The default value is the current directory that the cookie is being set in. \n\n`domain` - The domain that the cookie is available to. Cookies available to a lower domain, such as 'example.com' will be available to higher subdomains, such as 'www.example.com'.\n\n`secure` - Indicates that the cookie should only be transmitted over a secure HTTPS connection from the client. Default is false.\n\n\n```javascript\ncookie.remove(name);\n```\n\n`name` - cookie name\n\n\n```javascript\ncookie.isEnabled();\n```\n\n`true` or `false`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdelfimov%2Fjs-cookie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdelfimov%2Fjs-cookie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdelfimov%2Fjs-cookie/lists"}