Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

has-cors

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

has-cors

Detects support for Cross-Origin Resource Sharing

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.9M
decreased by-5%
Maintainers
1
Weekly downloads
 
Created

What is has-cors?

The has-cors npm package is a simple utility to check if the browser or environment supports Cross-Origin Resource Sharing (CORS). It is primarily used in web development to determine if CORS is enabled in the user's environment, which is crucial for making cross-origin requests in web applications.

What are has-cors's main functionalities?

Check CORS support

This feature allows developers to programmatically check if the current browser or environment supports CORS. The package exports a boolean value indicating the presence of CORS support. This is useful for conditionally enabling or disabling functionality based on CORS availability.

var hasCORS = require('has-cors');

console.log(hasCORS); // Outputs: true or false

Other packages similar to has-cors

Keywords

FAQs

Package last updated on 12 Nov 2014

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