{"id":27961796,"url":"https://github.com/evgv/acm","last_synced_at":"2025-06-13T08:07:20.291Z","repository":{"id":57173743,"uuid":"54281585","full_name":"evgv/acm","owner":"evgv","description":"Small client-side javascript library that makes managing cookies easy.","archived":false,"fork":false,"pushed_at":"2017-10-30T10:41:02.000Z","size":41,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-07T19:12:13.735Z","etag":null,"topics":["acm","cookie","cookie-manager","javascript","plugin"],"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/evgv.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":"2016-03-19T18:42:35.000Z","updated_at":"2017-09-06T12:38:52.000Z","dependencies_parsed_at":"2022-08-24T14:40:44.271Z","dependency_job_id":null,"html_url":"https://github.com/evgv/acm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/evgv/acm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evgv%2Facm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evgv%2Facm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evgv%2Facm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evgv%2Facm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/evgv","download_url":"https://codeload.github.com/evgv/acm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evgv%2Facm/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259606977,"owners_count":22883559,"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":["acm","cookie","cookie-manager","javascript","plugin"],"created_at":"2025-05-07T19:12:12.704Z","updated_at":"2025-06-13T08:07:20.261Z","avatar_url":"https://github.com/evgv.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Advanced Cookie Manager\n\n## v 1.1.4 (02192017)\n\nSmall client-side javascript library that makes managing cookies easy.\n\n[Features](#features)  \n[Browser Compatibility](#browser-compatibility)  \n[Install](#install)  \n[API Reference](#api-reference)\n\n## Features\n- [RFC6265](http://www.rfc-editor.org/rfc/rfc6265.txt) compliant\n- Cross browser\n- Lightweight\n- No dependencies\n\n## Browser Compatibility\nThe following browsers have passed all of the automated Cookies.js tests:\n- Chrome\n- Firefox 3+\n- Safari 4+\n- Opera 10+\n- Internet Explorer 6+\n\n## Install\n#### Direct download\n[v1.1.4](https://raw.githubusercontent.com/evgv/acm/master/src/build/acm.js) (~ 13.94 KB)\n[v1.1.4 Minified](https://raw.githubusercontent.com/evgv/acm/master/src/build/acm.min.js) (~ 2.52 KB)\n\n#### Use npm\n```bash\n    npm i advanced-cookie-manager\n```\n#### Use yarn\n```bash\n    yarn add advanced-cookie-manager\n```\n\n## API Reference                                                                                                                   \n\n**Methods**  \n[acm.initialize(options)](#initialize)  \n[acm.set(key, value, options = {})](#set)  \n[acm.get(key)](#get)  \n[acm.unset(key)](#unset)\n\n### Properties\n\n#### Expires\nA number (of seconds), a number parsable string, or a `Date` object of when the cookie will expire. By default is 0 (session cookie).\n\n**Example Usage**\n```javascript\nacm.expires = 3600; // Expires number format 1 hour\nacm.expires = '3600'; // Expires string format 1 hour\nacm.expires = new Date(2020, 0, 1); // Expires at Wed Jan 01 2020 00:00:00 GMT+0200\n```\n\n#### Path\nA string value of the path of the cookie. By default is '/'.\n\n**Example Usage**\n```javascript\nacm.path = '/'; // Path for all pages\nacm.path = '/cart'; // Path only for /cart page\nacm.path = '/success'; // Path only for /success page\n```\n\n#### Domain\nA string value of the domain of the cookie. By default is equal to current domain.\n\n**Example Usage**\n```javascript\nacm.domain = 'www.example.com'; // Set www.example.com as default domain\n```\n#### Secure\nA boolean value of whether or not the cookie should only be available over SSL. By default is _false_.\n\n_Just now it deprecated and dosen't use._\n\n\n### Additional properties\n\n#### Debug\nEnable debug option set show in console information about create/delee cookie.\n\n**Example Usage**\n```javascript\nacm.debug = false; // disable\nacm.debug = true; // enable\n```\n#### Encode\nSet encode cookie _encodeUri()_ value (encode by default), you can disable/enable this option.\n\n**Example Usage**\n```javascript\nacm.encode = false; // disable\nacm.encode = true; // enable\n```\n\n### Methods\n\n#### acm.initialize(options)\n\nSet default options for all new cookies\n\n**Example Usage**\n```javascript\n\n// Initialize all options\nacm.initialize({\n    expires : 3600,\n    path : '/',\n    domain : 'www.example.com',\n});\n\n// Initialize expires\nacm.initialize({\n    expires : 3600,\n});\n\n```\nAnd now all new cookies without options has this options as default.\n\n#### acm.set(key, value [, options])\n\nSets a cookie in the document. If the cookie already exist, it will be rewrite it.\n\n| Option    | Description                                                                                        | Default     |\n| --------: | -------------------------------------------------------------------------------------------------- | ----------- |\n| *expires* | A number (of seconds), a number parsable string, or a `Date` object of when the cookie will expire | `0`         |\n| *path*    | A string value of the path of the cookie                                                           | `/`         |\n| *domain*  | A string value of the domain of the cookie                                                         | `empty`     |\n| *secure*  | A boolean value of whether or not the cookie should only be available over SSL  (deprecated)       | `false`     |\n\n**Example Usage**\n```javascript\n\n// Setting a cookie value\nacm.set('key', 'value');\n\n// Setting cookies with additional options\nacm.set('key', 'value', { domain: 'www.example.com'});\n\n// Setting cookies with expiration values\nacm.set('key', 'value', { expires: 3600 }); // Expires in 1 hour\nacm.set('key', 'value', { expires: '3600' }); // Expires in 1 hour\nacm.set('key', 'value', { expires: new Date(2020, 0, 1) }); // Expires at Wed Jan 01 2020 00:00:00 GMT+0200\n\n```\n\n#### acm.get(key)\n\nReturns the value of the most locally scoped cookie with the specified key.\n\n**Example Usage**\n```javascript\n\n// Get the cookie value\nacm.get('key'); // \"value\"\n```\n\nIf `key` is empty ` acm()` method return all locally scoped cookies as array of items (cookies).\n\n**Example Usage**\n```javascript\n\n// Get all cookies\nacm.get(); // [[name  : name, value : value], [...], ...}]\n\n```  \n\n#### acm.unset(key)\n\nUnse the most locally scoped cookie with the specified key.\n\n**Example Usage**\n```javascript\n\n// Unset the cookie\nacm.unset('key');\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevgv%2Facm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevgv%2Facm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevgv%2Facm/lists"}