diff --git a/README.md b/README.md index 2d171b4..30690c2 100644 --- a/README.md +++ b/README.md @@ -50,8 +50,8 @@ import {fetch, CookieJar} from "node-fetch-cookies"; ## Documentation -### async fetch(cookieJar, url[, options]) -- `cookieJar` A [CookieJar](#class-cookiejar) instance, an array of CookieJar instances or null, if you don't want to send or store cookies. +### async fetch(cookieJars, url[, options]) +- `cookieJars` A [CookieJar](#class-cookiejar) instance, an array of CookieJar instances or null, if you don't want to send or store cookies. - `url` and `options` as in https://github.com/bitinn/node-fetch#fetchurl-options Returns a Promise resolving to a [Response](https://github.com/bitinn/node-fetch#class-response) instance on success. diff --git a/src/cookie.mjs b/src/cookie.mjs index 03dba0e..6c85ed2 100644 --- a/src/cookie.mjs +++ b/src/cookie.mjs @@ -37,7 +37,7 @@ export default class Cookie { // check if url is valid new url.URL(requestURL); - + const splitted = str.split("; "); [this.name, this.value] = splitN(splitted[0], "=", 1); if(!this.name)