mirror of
https://github.com/S2-/minifyfromhtml.git
synced 2025-08-03 04:10:04 +02:00
update node modules
This commit is contained in:
36
node_modules/tough-cookie/README.md
generated
vendored
36
node_modules/tough-cookie/README.md
generated
vendored
@@ -57,7 +57,7 @@ Transforms a domain-name into a canonical domain-name. The canonical domain-nam
|
||||
|
||||
Answers "does this real domain match the domain in a cookie?". The `str` is the "current" domain-name and the `domStr` is the "cookie" domain-name. Matches according to RFC6265 Section 5.1.3, but it helps to think of it as a "suffix match".
|
||||
|
||||
The `canonicalize` parameter will run the other two paramters through `canonicalDomain` or not.
|
||||
The `canonicalize` parameter will run the other two parameters through `canonicalDomain` or not.
|
||||
|
||||
### `defaultPath(path)`
|
||||
|
||||
@@ -85,7 +85,7 @@ Returns the public suffix of this hostname. The public suffix is the shortest d
|
||||
|
||||
For example: `www.example.com` and `www.subdomain.example.com` both have public suffix `example.com`.
|
||||
|
||||
For further information, see http://publicsuffix.org/. This module derives its list from that site.
|
||||
For further information, see http://publicsuffix.org/. This module derives its list from that site. This call is currently a wrapper around [`psl`](https://www.npmjs.com/package/psl)'s [get() method](https://www.npmjs.com/package/psl#pslgetdomain).
|
||||
|
||||
### `cookieCompare(a,b)`
|
||||
|
||||
@@ -186,7 +186,7 @@ sets the maxAge in seconds. Coerces `-Infinity` to `"-Infinity"` and `Infinity`
|
||||
|
||||
expiryTime() Computes the absolute unix-epoch milliseconds that this cookie expires. expiryDate() works similarly, except it returns a `Date` object. Note that in both cases the `now` parameter should be milliseconds.
|
||||
|
||||
Max-Age takes precedence over Expires (as per the RFC). The `.creation` attribute -- or, by default, the `now` paramter -- is used to offset the `.maxAge` attribute.
|
||||
Max-Age takes precedence over Expires (as per the RFC). The `.creation` attribute -- or, by default, the `now` parameter -- is used to offset the `.maxAge` attribute.
|
||||
|
||||
If Expires (`.expires`) is set, that's returned.
|
||||
|
||||
@@ -198,7 +198,7 @@ compute the TTL relative to `now` (milliseconds). The same precedence rules as
|
||||
|
||||
The "number" `Infinity` is returned for cookies without an explicit expiry and `0` is returned if the cookie is expired. Otherwise a time-to-live in milliseconds is returned.
|
||||
|
||||
### `.canonicalizedDoman()`
|
||||
### `.canonicalizedDomain()`
|
||||
|
||||
### `.cdomain()`
|
||||
|
||||
@@ -354,6 +354,16 @@ The `store` argument is optional, but must be a _synchronous_ `Store` instance i
|
||||
|
||||
The _source_ and _destination_ must both be synchronous `Store`s. If one or both stores are asynchronous, use `.clone` instead. Recall that `MemoryCookieStore` supports both synchronous and asynchronous API calls.
|
||||
|
||||
### `.removeAllCookies(cb(err))`
|
||||
|
||||
Removes all cookies from the jar.
|
||||
|
||||
This is a new backwards-compatible feature of `tough-cookie` version 2.5, so not all Stores will implement it efficiently. For Stores that do not implement `removeAllCookies`, the fallback is to call `removeCookie` after `getAllCookies`. If `getAllCookies` fails or isn't implemented in the Store, that error is returned. If one or more of the `removeCookie` calls fail, only the first error is returned.
|
||||
|
||||
### `.removeAllCookiesSync()`
|
||||
|
||||
Sync version of `.removeAllCookies()`
|
||||
|
||||
## Store
|
||||
|
||||
Base class for CookieJar stores. Available as `tough.Store`.
|
||||
@@ -418,19 +428,29 @@ Removes matching cookies from the store. The `path` parameter is optional, and
|
||||
|
||||
Pass an error ONLY if removing any existing cookies failed.
|
||||
|
||||
### `store.removeAllCookies(cb(err))`
|
||||
|
||||
_Optional_. Removes all cookies from the store.
|
||||
|
||||
Pass an error if one or more cookies can't be removed.
|
||||
|
||||
**Note**: New method as of `tough-cookie` version 2.5, so not all Stores will implement this, plus some stores may choose not to implement this.
|
||||
|
||||
### `store.getAllCookies(cb(err, cookies))`
|
||||
|
||||
Produces an `Array` of all cookies during `jar.serialize()`. The items in the array can be true `Cookie` objects or generic `Object`s with the [Serialization Format] data structure.
|
||||
_Optional_. Produces an `Array` of all cookies during `jar.serialize()`. The items in the array can be true `Cookie` objects or generic `Object`s with the [Serialization Format] data structure.
|
||||
|
||||
Cookies SHOULD be returned in creation order to preserve sorting via `compareCookies()`. For reference, `MemoryCookieStore` will sort by `.creationIndex` since it uses true `Cookie` objects internally. If you don't return the cookies in creation order, they'll still be sorted by creation time, but this only has a precision of 1ms. See `compareCookies` for more detail.
|
||||
|
||||
Pass an error if retrieval fails.
|
||||
|
||||
**Note**: not all Stores can implement this due to technical limitations, so it is optional.
|
||||
|
||||
## MemoryCookieStore
|
||||
|
||||
Inherits from `Store`.
|
||||
|
||||
A just-in-memory CookieJar synchronous store implementation, used by default. Despite being a synchronous implementation, it's usable with both the synchronous and asynchronous forms of the `CookieJar` API.
|
||||
A just-in-memory CookieJar synchronous store implementation, used by default. Despite being a synchronous implementation, it's usable with both the synchronous and asynchronous forms of the `CookieJar` API. Supports serialization, `getAllCookies`, and `removeAllCookies`.
|
||||
|
||||
## Community Cookie Stores
|
||||
|
||||
@@ -473,7 +493,7 @@ These are some Store implementations authored and maintained by the community. T
|
||||
|
||||
# Copyright and License
|
||||
|
||||
(tl;dr: BSD-3-Clause with some MPL/2.0)
|
||||
BSD-3-Clause:
|
||||
|
||||
```text
|
||||
Copyright (c) 2015, Salesforce.com, Inc.
|
||||
@@ -505,5 +525,3 @@ These are some Store implementations authored and maintained by the community. T
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
```
|
||||
|
||||
Portions may be licensed under different licenses (in particular `public_suffix_list.dat` is MPL/2.0); please read that file and the LICENSE file for full details.
|
||||
|
Reference in New Issue
Block a user