From 303185c9ffe1ca7f4b5186529649cdcff32a7531 Mon Sep 17 00:00:00 2001 From: jkhsjdhjs Date: Fri, 29 Nov 2019 01:47:17 +0100 Subject: [PATCH] readme: rename fetch cookieJar parameter to cookieJars cookie: trim line --- README.md | 4 ++-- src/cookie.mjs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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)