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

http-client-hints

Package Overview
Dependencies
Maintainers
0
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

http-client-hints

HTTP Client Hints

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
increased by100%
Maintainers
0
Weekly downloads
 
Created
Source

HTTP Client Hints

npm version npm downloads JSDocs License

Access and use HTTP Client Hints in your application. Detect the client browser and the operating system on your server.

Features

HTTP Client hints

[!WARNING] The HTTP Client hints headers listed below are still in draft and only Chromium based browsers support them: Chrome, Edge, Chromium and Opera.

The module includes support for the following HTTP Client hints:

Quick Setup

Install the package you want to use in your application, this package exports each client hint separately, or you can use the default to use all the hints.

import {
  extractBrowserHints,
  extractCriticalHints,
  extractDeviceHints,
  extractNetworkHints,
} from 'http-client-hints'

or

import { extractBrowserHints } from 'http-client-hints/browser'
import { extractCriticalHints } from 'http-client-hints/critical'
import { extractDeviceHints } from 'http-client-hints/device'
import { extractNetworkHints } from 'http-client-hints/network'

You can also use require (CommonJS: CJS), the package has been built with dual ESM and CJS support.

const {
  extractBrowserHints,
  extractCriticalHints,
  extractDeviceHints,
  extractNetworkHints,
} = require('http-client-hints')

or

const { extractBrowserHints } = require('http-client-hints/browser')
const { extractCriticalHints } = require('http-client-hints/critical')
const { extractDeviceHints } = require('http-client-hints/device')
const { extractNetworkHints } = require('http-client-hints/network')

You can also use this package when using H3:

import { extractImageClientHints } from 'http-client-hints/h3'

If you want to use this package in your Nuxt application, check Nuxt HTTP Client Hints Module.

That's it! You can now use HTTP Client Hints in your server application ✨

You can check the source code or the JSDocs for more information.

License

MIT License © 2024-PRESENT Joaquín Sánchez

Keywords

FAQs

Package last updated on 28 Oct 2024

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