-`flags` A string specifying whether cookies should be read and/or written from/to the jar when passing it as parameter to [fetch](#fetchcookiejar-url-options).
-`cookies` An optional initializer for the cookie jar - either an array of [Cookie](#class-cookie) instances or a single Cookie instance.
#### addCookie(cookie[, url])
Adds a cookie to the jar.
-`cookie` A [Cookie](#class-cookie) instance to add to the cookie jar. Alternatively this can also be a string, for example the string received from a website. In this case `url` should be specified.
-`url` The url a cookie has been received from.
#### forEach(callback)
Just a wrapper for `CookieJar.cookies.forEach(callback)`.
#### save()
Saves the cookie jar to disk. Only non-expired cookies are saved.
### Class: Cookie
An abstract representation of a cookie.
#### Properties
-`name` The identifier of the cookie.
-`value` The value of the cookie.
-`expiry` A [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) object of the cookies expiry date.
-`domain` The domain the cookie is valid for.
-`path` The path the cookie is valid for.
-`secure` A boolean value representing the cookie's secure attribute. If set the cookie will only be used for `https` requests.
-`subdomains` A boolean value specifying whether the cookie should be used for subdomains of the domain or not.
#### new Cookie(cookie, url)
-`cookie` The string representation of a cookie as send by a webserver.
-`url` The url the cookie has been received from.
#### static fromObject(obj)
Creates a cookie instance from an already existing object with the same properties.
#### serialize()
Serializes the cookie, transforming it to `name=value` so it can be used in requests.
#### hasExpired()
Returns whether the cookie has expired or not.
#### isValidForRequest(url)
Returns whether the cookie is valid for a request to `url`. If not, it won't be send by the fetch wrapper.
## License
This project is licensed under the MIT license, see [LICENSE](LICENSE).