ts-simple-cookie
TypeScript icon, indicating that this package has built-in type declarations

1.1.6 • Public • Published

ts-simple-cookie

ts-simple-cookie is a simple, easy to use package for managing cookies. To use this package, simply create a new instance of Cookie. Here is an example:

import { Cookie } from "ts-simple-cookie";

const myCookie = new Cookie();

// Creates a new cookie
myCookie.create("newCookie", "12345", {
  expires: "Wed, 25 Jun 2020 12:00:00 UTC",
});

// Edits an existing cookie
myCookie.edit("newCookie", "newValue", {
  expires: "Thu, 26 Jun 2020 12:00:00 UTC",
});

// Returns the value of an existing cookie
const valueOfCookie = myCookie.get("newCookie");

// Deletes an existing cookie
myCookie.delete("newCookie");

/ts-simple-cookie/

    Package Sidebar

    Install

    npm i ts-simple-cookie

    Weekly Downloads

    2

    Version

    1.1.6

    License

    MIT

    Unpacked Size

    8.6 kB

    Total Files

    8

    Last publish

    Collaborators

    • marcrusch