@kavach/cookie 1.0.2 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.d.ts +28 -0
  2. package/package.json +1 -1
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Parse a cookie header.
3
+ *
4
+ * Parse the given cookie header string into an object
5
+ * The object has the various cookies as keys(names) => values
6
+ *
7
+ * @param {string} str
8
+ * @param {object} [options]
9
+ * @return {object}
10
+ * @public
11
+ */
12
+ export function parse(str: string, options?: object): object;
13
+ /**
14
+ * Serialize data into a cookie header.
15
+ *
16
+ * Serialize the a name value pair into a cookie string suitable for
17
+ * http headers. An optional options object specified cookie parameters.
18
+ *
19
+ * serialize('foo', 'bar', { httpOnly: true })
20
+ * => "foo=bar; httpOnly"
21
+ *
22
+ * @param {string} name
23
+ * @param {string} val
24
+ * @param {object} [options]
25
+ * @return {string}
26
+ * @public
27
+ */
28
+ export function serialize(name: string, val: string, options?: object): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kavach/cookie",
3
- "version": "1.0.2",
3
+ "version": "1.1.0",
4
4
  "description": "Cookie serialize/deserialize forked from jshttp/cookie",
5
5
  "author": "Jerry Thomas <me@jerrythomas.name>",
6
6
  "license": "MIT",