{"id":15889169,"url":"https://github.com/arshadkazmi42/firefox-cookie","last_synced_at":"2025-03-20T10:31:16.566Z","repository":{"id":50794266,"uuid":"204295520","full_name":"arshadkazmi42/firefox-cookie","owner":"arshadkazmi42","description":"Firefox cookie manager for node. To set and get cookie from firefox ","archived":false,"fork":false,"pushed_at":"2021-08-15T08:54:15.000Z","size":274,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-07T06:41:27.359Z","etag":null,"topics":["cookie","cookie-crud","cookie-manager","crud","database","firefox","firefox-cookie-manager","sqlite"],"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/arshadkazmi42.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-25T13:07:11.000Z","updated_at":"2021-08-15T08:53:15.000Z","dependencies_parsed_at":"2022-08-30T08:30:34.539Z","dependency_job_id":null,"html_url":"https://github.com/arshadkazmi42/firefox-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/arshadkazmi42%2Ffirefox-cookie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arshadkazmi42%2Ffirefox-cookie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arshadkazmi42%2Ffirefox-cookie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arshadkazmi42%2Ffirefox-cookie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arshadkazmi42","download_url":"https://codeload.github.com/arshadkazmi42/firefox-cookie/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221751726,"owners_count":16874831,"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","cookie-crud","cookie-manager","crud","database","firefox","firefox-cookie-manager","sqlite"],"created_at":"2024-10-06T06:41:31.067Z","updated_at":"2024-10-28T00:22:03.461Z","avatar_url":"https://github.com/arshadkazmi42.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# firefox-cookie\n\n[![Build](https://github.com/arshadkazmi42/firefox-cookie/actions/workflows/nodejs.yml/badge.svg)](https://github.com/arshadkazmi42/firefox-cookie/actions/workflows/nodejs.yml)\n\nNode Cookie Manager for Firefox, read / write cookie from sqlite db\n\n## Install\n\n```\nnpm i firefox-cookie\n```\n\n## Usage\n\n```javascript\n\n// Search for the \"default\" profile in Firefox implicitly https://support.mozilla.org/gl/questions/1264072\nconst FirefoxCookie = require('firefox-cookie');\nconst FFCookie = new FirefoxCookie();\n\n// Search for the \"default-release\" new profile in Firefox explicitly (or any other profile you give as parameter)\nconst FirefoxCookie = require('firefox-cookie');\nconst FFCookie = new FirefoxCookie(\"default-release\");\n\n// Reading cookie\nconst cookie = await FFCookie.getCookie('arshad.com');\n\n// Inserting cookie\nconst DATA = [\n  {\n    'baseDomain': 'arshad.com',\n    'originAttributes': '',\n    'name': 'arshad',\n    'value': 'arshad-test-cookie',\n    'host': 'arshad.com',\n    'path': '/root',\n    'expiry': 1,\n    'lastAccessed': 111111111,\n    'creationTime': 10001110,\n    'isSecure': 1,\n    'isHttpOnly': 0,\n    'inBrowserElement': 0,\n    'sameSite': 0,\n  }\n];\n\nawait FFCookie.setCookie(DATA);\n```\n\n## API\n\n- **`getCookie(path)`**\n  - Returns cookie json from database for the input path\n    - **Params**\n      - path (String)\n\n- **`setCookie(cookies)`**\n  - Adds all the input cookies into the sqlite database\n    - **Params**\n      - cookies (Array of cookies object)\n\n- **`removeCookie(domain)`**\n  - Removes all records matching the domain.\n  - \u003e It uses `like` condition (`%domain%`) so anything matching the pattern will be removed\n    - **Params**\n      - path (String)\n\n## Contributing\n\nInterested in contributing to this project?\nYou can log any issues or suggestion related to this library [here](https://github.com/arshadkazmi42/firefox-cookie/issues/new)\n\nRead our contributing [guide](CONTRIBUTING.md) on getting started with contributing to the codebase\n\n## Contributors\n\nThank you to all the contributors who have helped us in making this project better :raised_hands:\n\n\u003ca href=\"https://github.com/arshadkazmi42\"\u003e\u003cimg src=\"https://github.com/arshadkazmi42.png\" width=\"30\" /\u003e\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farshadkazmi42%2Ffirefox-cookie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farshadkazmi42%2Ffirefox-cookie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farshadkazmi42%2Ffirefox-cookie/lists"}