New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

check-header-hex

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

check-header-hex

Checks read stream of files for proper hex headers, the function is a generator

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

check-header-hex

This repository checks for valid file headers; the function is a generator, so you need to yield.

##Usage npm install check-header-hex var check = require('check-header-hex'); var stream = fs.createReadStream(file.path); // or data stream var validHex = '25504446,FFD8FFE1, FFD8FFE0, FFD8FFFE, 89504E47'; // This can be an individual hex or comma delimited; var isValid = yield check.checkIfValidHeader(validHex, stream);

The function returns true or false.

Keywords

FAQs

Package last updated on 27 May 2015

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