Socket
Socket
Sign inDemoInstall

@types/js-cookie

Package Overview
Dependencies
0
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @types/js-cookie

TypeScript definitions for js-cookie


Version published
Weekly downloads
3.2M
decreased by-0.1%
Maintainers
1
Install size
7.26 kB
Created
Weekly downloads
 

Package description

What is @types/js-cookie?

The @types/js-cookie package provides TypeScript type definitions for the js-cookie library, which is a simple, lightweight JavaScript API for handling browser cookies. It allows developers to use js-cookie in TypeScript projects with type checking and IntelliSense support.

What are @types/js-cookie's main functionalities?

Create a cookie

This code creates a cookie named 'name' with the value 'value'.

Cookies.set('name', 'value');

Read a cookie

This code reads the value of the cookie named 'name'.

let myCookie = Cookies.get('name');

Delete a cookie

This code deletes the cookie named 'name'.

Cookies.remove('name');

Create a cookie with options

This code creates a cookie with additional options like expiration and path.

Cookies.set('name', 'value', { expires: 7, path: '' });

Other packages similar to @types/js-cookie

Readme

Source

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, BendingBender, Antoine Lépée, Yuto Doi, Nicolas Reynis, and Piotr Błażejewicz.

FAQs

Last updated on 07 Nov 2023

Did you know?

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc