Socket
Book a DemoInstallSign in
Socket

@alt-javascript/cookies

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@alt-javascript/cookies

Simple utility to ease the use of browser cookies.

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

Simple utility to ease the use of browser cookies.

NPM
Language Badge Package Badge
release notes

Introduction

Simple utility to ease the use of browser cookies.

Usage

The module is also able to be used directly in the browser, as an IIFE (Immediately Invoked Function Expression), as follows:

   <script src="https://cdn.jsdelivr.net/npm/@alt-javascript/cookies/dist/alt-javascript-cookies-iife.js"></script>

   <script>
       cookies.setCookie('somecookie','giveitavalue',365,'Strict');// expires in 365 days, SameSite == Strict (default)
       cookies.getCookie('somecookie');
       cookies.deleteCookie('somecookie');
   </script>

Or import the ES6 module bundle from a module, as follows:

import { Cookies } from 'https://cdn.jsdelivr.net/npm/@alt-javascript/cookies/dist/alt-javascript-cookies-esm.js'

let cookies = new Cookies();

//...as above

Logger

The Cookies class optionally accepts an @alt-javascript/logger, an is configured with the @alt-javascript/cookies/Cookies qualifier by default when using with @alt-javascript/boot

License

May be freely distributed under the MIT license.

Copyright (c) 2021-2022 Craig Parravicini

Keywords

cookies

FAQs

Package last updated on 17 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.