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

img-validation

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

img-validation

A lightweight and versatile image validation library for Node.js applications.

  • 1.0.13
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

ImgValidation

ImgValidation a package to validate image

Getting Started

Install package with npm

npm install image-validate

or with yarn

yarn add image-validate

Usage

import ImgValidation from "img-validation";

// validate a base64 string
const isValidBase64 = await ImgValidation.isValidBase64(base64String);

// validate a URL
const isValidUrl = await ImgValidation.url(url);

// validate a file
const isValidFile = await ImgValidation.file(file);

// validate a buffer
const isValidBuffer = await ImgValidation.buffer(buffer);

// validate a stream
const isValidStream = await ImgValidation.stream(stream);

// validate a file path
const isValidPath = await ImgValidation.path(path);

// validate any image input
const isValidImage = await ImgValidation.isValidImage(image);

Keywords

FAQs

Package last updated on 11 Apr 2023

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