Socket
Socket
Sign inDemoInstall

@types/caseless

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/caseless

TypeScript definitions for caseless


Version published
Weekly downloads
5.1M
increased by1.25%
Maintainers
1
Weekly downloads
 
Created

What is @types/caseless?

@types/caseless provides TypeScript type definitions for the 'caseless' npm package, which allows for case-insensitive operations on HTTP headers.

What are @types/caseless's main functionalities?

Set a header

This feature allows you to set a header in a case-insensitive manner. The 'set' method ensures that the header name is stored in a consistent case.

const caseless = require('caseless');
const headers = caseless();
headers.set('Content-Type', 'application/json');

Get a header

This feature allows you to retrieve a header value in a case-insensitive manner. The 'get' method will return the value regardless of the case of the input header name.

const caseless = require('caseless');
const headers = caseless();
headers.set('Content-Type', 'application/json');
const contentType = headers.get('content-type');

Check if a header exists

This feature allows you to check if a header exists in a case-insensitive manner. The 'has' method returns a boolean indicating the presence of the header.

const caseless = require('caseless');
const headers = caseless();
headers.set('Content-Type', 'application/json');
const hasContentType = headers.has('content-type');

Delete a header

This feature allows you to delete a header in a case-insensitive manner. The 'del' method removes the header regardless of the case of the input header name.

const caseless = require('caseless');
const headers = caseless();
headers.set('Content-Type', 'application/json');
headers.del('content-type');

Other packages similar to @types/caseless

FAQs

Package last updated on 28 Dec 2017

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

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc