{"id":25376773,"url":"https://github.com/terrierscript/cookie-jwt","last_synced_at":"2025-04-09T10:33:40.708Z","repository":{"id":57207009,"uuid":"70019668","full_name":"terrierscript/cookie-jwt","owner":"terrierscript","description":"Wrapper for cookie + jwt-decode","archived":false,"fork":false,"pushed_at":"2017-05-24T16:56:53.000Z","size":10,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-08T00:35:59.032Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/terrierscript.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-05T01:03:57.000Z","updated_at":"2017-12-11T09:42:55.000Z","dependencies_parsed_at":"2022-09-08T14:22:43.140Z","dependency_job_id":null,"html_url":"https://github.com/terrierscript/cookie-jwt","commit_stats":null,"previous_names":["inuscript/cookie-jwt"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terrierscript%2Fcookie-jwt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terrierscript%2Fcookie-jwt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terrierscript%2Fcookie-jwt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terrierscript%2Fcookie-jwt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/terrierscript","download_url":"https://codeload.github.com/terrierscript/cookie-jwt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247886861,"owners_count":21012911,"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":"2025-02-15T04:39:18.432Z","updated_at":"2025-04-09T10:33:40.649Z","avatar_url":"https://github.com/terrierscript.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Tiny wrapper function for get [jwt](http://jwt.io/) payload from cookie\n\n[![Build Status](https://travis-ci.org/inuscript/cookie-jwt.svg?branch=master)](https://travis-ci.org/inuscript/cookie-jwt)\n[![npm](https://img.shields.io/npm/v/cookie-jwt.svg?maxAge=2592000)](https://www.npmjs.com/package/cookie-jwt)\n\n# Description\n\nThis library is wrapper function combinate [`cookie`](https://github.com/jshttp/cookie) and [`jwt-decode`](https://github.com/auth0/jwt-decode)\n\n# Usage\n\n```js\nvar cookieJwt = require('cookie-jwt')\n\nvar payload = cookieJwt(document.cookie, 'my-jwt-token-key')\n\n// payload like below:\n// { admin: true, name: 'John Doe', sub: '1234567890' }\n```\n\n# API\n\n## cookieJwt(`cookieString`, `jwtTokenKey`)\n\n* Return jwt payload.\n* If a got parse error, this function return **empty object**  (like `{}`)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterrierscript%2Fcookie-jwt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fterrierscript%2Fcookie-jwt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterrierscript%2Fcookie-jwt/lists"}