Socket
Socket
Sign inDemoInstall

valid-data-url

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

valid-data-url

Detect if a string is a data URL


Version published
Maintainers
1
Created

What is valid-data-url?

The valid-data-url npm package is a utility for validating whether a given string is a valid data URL. Data URLs are used to embed small files inline in documents.

What are valid-data-url's main functionalities?

Validate Data URL

This feature allows you to check if a given string is a valid data URL. The code sample demonstrates how to use the valid-data-url package to validate a base64 encoded data URL.

const validDataUrl = require('valid-data-url');

const url = 'data:text/plain;base64,SGVsbG8sIFdvcmxkIQ==';
const isValid = validDataUrl(url);
console.log(isValid); // true

Other packages similar to valid-data-url

Keywords

FAQs

Package last updated on 15 Aug 2017

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