cookiejar's People
cookiejar's Issues
Add an accepts or test method to the CookieJar
Add a method like CookieJar.accepts
or CookieJar.test
to see if the user allows writing cookies from our domain.
Escape cookie names
Cookie names should be properly escaped.
The default expiry value is insensible
Right now the default expiry value is today which isn't of any use.
Add a touch method to the CookieJar
To update the expiry time of that Cookie
.
Example usage:
function retrieveApplicationState (arg_cookieName)
{
var myCookieName = arg_cookieName || 'myCookie'
, myCookie;
try
{
myCookie = CookieJar.read(myCookieName);
CookieJar.touch(myCookie);
}
catch (exception)
{
myCookie = new Cookie(myCookieName, 'some-default-value');
CookieJar.write(myCookie);
}
return myCookie;
}
JSON value transformer
Perhaps add a JSON value transformer to store complicated data structures as JSON strings.
Add a method to the CookieJar to test if a Cookie by that name exists
The method CookieJar.has
differs from CookieJar.accepts
that it checks for an explicit cookie by name instead of the general acceptance of cookies.
Test suite
Select a unit testing framework and create a test suite for the core functionality.
See this topic at StackOverflow for possible unit testing frameworks.
Create object composition or inheritance chain around a basic Cookie object
Cookies that are read don't have a meaningful expiry date and path.
Essentially the CookieJar.read
method should return a stripped down version of the current Cookie
implementation without the Cookie.getPath
and Cookie.getExpires
accessors.
Those two methods should either be put in a sub-class or a composite object.
Documentation
- API Docs
- Usage examples
Properly namespace code
For now, all code lives in the global namespace. Obviously this will have to change though I'm not sure about all the new found names.
For now:
CookieJar.get
CookieJar.add
CookieJar.remove
CookieJar.touch
CookieJar.Cookie
CookieJar.Storage
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.