js-cookie/000755 001751 000177 0000000000 14522325161014417 5ustar00runner000000 000000 1452232516114522325161js-cookie/LICENSE000644 001751 000177 0000002165 14522325161015430 0ustar00runner000000 000000 1452232516114522325161 MIT License Copyright (c) Microsoft Corporation. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE js-cookie/README.md000644 001751 000177 0000001324 14522325161015703 0ustar00runner000000 000000 1452237405414522325161# Installation > `npm install --save @types/js-cookie` # Summary This package contains type definitions for js-cookie (https://github.com/js-cookie/js-cookie). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/js-cookie. ### Additional Details * Last updated: Tue, 07 Nov 2023 03:09:37 GMT * Dependencies: none # Credits These definitions were written by [Theodore Brown](https://github.com/theodorejb), [BendingBender](https://github.com/BendingBender), [Antoine Lépée](https://github.com/alepee), [Yuto Doi](https://github.com/yutod), [Nicolas Reynis](https://github.com/nreynis), and [Piotr Błażejewicz](https://github.com/peterblazejewicz). js-cookie/index.d.mts000644 001751 000177 0000000161 14522325161016473 0ustar00runner000000 000000 1452232516114522325161import * as jsCookie from "./index.js"; declare const Cookies: jsCookie.CookiesStatic; export default Cookies; js-cookie/index.d.ts000644 001751 000177 0000007136 14522325161016327 0ustar00runner000000 000000 1452232516114522325161declare namespace Cookies { interface CookieAttributes { /** * Define when the cookie will be removed. Value can be a Number * which will be interpreted as days from time of creation or a * Date instance. If omitted, the cookie becomes a session cookie. */ expires?: number | Date | undefined; /** * Define the path where the cookie is available. Defaults to '/' */ path?: string | undefined; /** * Define the domain where the cookie is available. Defaults to * the domain of the page where the cookie was created. */ domain?: string | undefined; /** * A Boolean indicating if the cookie transmission requires a * secure protocol (https). Defaults to false. */ secure?: boolean | undefined; /** * Asserts that a cookie must not be sent with cross-origin requests, * providing some protection against cross-site request forgery * attacks (CSRF) */ sameSite?: "strict" | "Strict" | "lax" | "Lax" | "none" | "None" | undefined; /** * An attribute which will be serialized, conformably to RFC 6265 * section 5.2. */ [property: string]: any; } interface CookiesStatic { readonly attributes: CookieAttributes; readonly converter: Required>; /** * Create a cookie */ set(name: string, value: string | T, options?: CookieAttributes): string | undefined; /** * Read cookie */ get(name: string): string | T | undefined; /** * Read all available cookies */ get(): { [key: string]: string }; /** * Delete cookie */ remove(name: string, options?: CookieAttributes): void; /** * Cookie attribute defaults can be set globally by creating an * instance of the api via withAttributes(), or individually for * each call to Cookies.set(...) by passing a plain object as the * last argument. Per-call attributes override the default attributes. */ withAttributes(attributes: CookieAttributes): CookiesStatic; /** * Create a new instance of the api that overrides the default * decoding implementation. All methods that rely in a proper * decoding to work, such as Cookies.remove() and Cookies.get(), * will run the converter first for each cookie. The returned * string will be used as the cookie value. */ withConverter(converter: Converter): CookiesStatic; } interface Converter { write?: CookieWriteConverter | undefined; read?: CookieReadConverter | undefined; } type CookieWriteConverter = (value: string | T, name: string) => string; type CookieReadConverter = (value: string, name: string) => string | T; } declare const Cookies: Cookies.CookiesStatic & { /** * If there is any danger of a conflict with the namespace Cookies, * the noConflict method will allow you to define a new namespace * and preserve the original one. This is especially useful when * running the script on third party sites e.g. as part of a widget * or SDK. Note: The noConflict method is not necessary when using * AMD or CommonJS, thus it is not exposed in those environments. */ noConflict?(): Cookies.CookiesStatic; }; export = Cookies; export as namespace Cookies; js-cookie/package.json000644 001751 000177 0000003362 14522325161016716 0ustar00runner000000 000000 1452237405414522325161{ "name": "@types/js-cookie", "version": "3.0.6", "description": "TypeScript definitions for js-cookie", "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/js-cookie", "license": "MIT", "contributors": [ { "name": "Theodore Brown", "githubUsername": "theodorejb", "url": "https://github.com/theodorejb" }, { "name": "BendingBender", "githubUsername": "BendingBender", "url": "https://github.com/BendingBender" }, { "name": "Antoine Lépée", "githubUsername": "alepee", "url": "https://github.com/alepee" }, { "name": "Yuto Doi", "githubUsername": "yutod", "url": "https://github.com/yutod" }, { "name": "Nicolas Reynis", "githubUsername": "nreynis", "url": "https://github.com/nreynis" }, { "name": "Piotr Błażejewicz", "githubUsername": "peterblazejewicz", "url": "https://github.com/peterblazejewicz" } ], "main": "", "types": "index.d.ts", "exports": { ".": { "types": { "import": "./index.d.mts", "require": "./index.d.ts" } }, "./package.json": "./package.json" }, "repository": { "type": "git", "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", "directory": "types/js-cookie" }, "scripts": {}, "dependencies": {}, "typesPublisherContentHash": "d8a8b39fde98e89be2790dfbecea0ff8e70cd2773a5149120bae93ccf439920c", "typeScriptVersion": "4.5" }