Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tristen/cm.js
Managing cookies easily!
https://github.com/tristen/cm.js
Last synced: 19 days ago
JSON representation
Managing cookies easily!
- Host: GitHub
- URL: https://github.com/tristen/cm.js
- Owner: tristen
- Created: 2013-04-13T01:54:45.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-01-23T14:29:29.000Z (almost 12 years ago)
- Last Synced: 2024-11-15T23:08:17.117Z (about 1 month ago)
- Size: 61.5 KB
- Stars: 0
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CM.JS
cm.js provides easy cookie managing.
* Managing cookies has never been this easy
* Lightweight
* Parses JSON (requires JSON2)## Documentation
`CM.set( string key, mixed value [, date expires] )`
Sets or overwrites the value of a cookie.
* key: alpha-numeric key
* value: cookie value
* expires: date object`CM.setObject( object object [, date expires] )`
Sets or overwrites multiple cookies using an object as input.
* object: an object
`CM.get( string key )`
Gets the value of a cookie.
* key: alpha-numeric key
`CM.getObject( void )`
Gets all set cookies as an object.
`CM.unset( string key )`
Unsets a specific cookie.
* key: alpha-numeric key
`CM.clear( void )`
Clears all known accessible cookies.