Socket
Socket
Sign inDemoInstall

@shopify/network

Package Overview
Dependencies
0
Maintainers
19
Versions
48
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shopify/network

Common values related to dealing with the network


Version published
Maintainers
19
Weekly downloads
108,451
decreased by-10.28%
Install size
45.8 kB

Weekly downloads

Readme

Source

@shopify/network

Build Status Build Status License: MIT npm version npm bundle size (minified + gzip)

Common values related to dealing with the network.

Installation

$ yarn add @shopify/network

Usage

Import any of the enums or functions in this package to get a friendly API to common network details. The following values are exposed from this library:

  • Method: enum for HTTP methods
  • StatusCode: enum for HTTP status codes (mapping from name to number)
  • ResponseType: response type enum (2xx, 3xx, etc)
  • Header: enum for common header names
  • CspDirective: enum for names of content security policy directives
  • CspSandboxAllow: enum for values allowed in the CSP sandbox directive
  • SpecialSource: enum for "special" (non-URI) sources usable in many CSP directives
  • nonceSource(): function for generating nonce sources in CSP directives
  • getResponseType: returns the ResponseType for an HTTP status code
  • HashAlgorithm: enum for hash algorithms usable in several CSP directives
  • hashSource(): function for generating hash sources in CSP directives

FAQs

Last updated on 24 Aug 2022

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