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

@types/mdurl

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/mdurl

TypeScript definitions for mdurl

  • 2.0.0
  • ts4.7
  • ts4.8
  • ts4.9
  • ts5.0
  • ts5.1
  • ts5.2
  • ts5.3
  • ts5.4
  • ts5.5
  • ts5.6
  • ts5.7
  • ts5.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.5M
decreased by-12.28%
Maintainers
1
Weekly downloads
 
Created

What is @types/mdurl?

The @types/mdurl package provides TypeScript type definitions for the mdurl library, which is a utility for encoding and decoding URLs in Markdown files. These type definitions allow TypeScript developers to use mdurl in a type-safe manner, ensuring that the correct types are used for URL processing functions. This package is particularly useful for developers working on Markdown processing tools or any applications that need to handle URLs within Markdown files.

What are @types/mdurl's main functionalities?

Encoding URLs

This feature allows you to encode a URL to ensure it is safely and correctly represented in Markdown. The code sample demonstrates how to encode a URL containing non-Latin characters, making it suitable for inclusion in a Markdown file.

import { encode } from 'mdurl';
const encodedUrl = encode('https://example.com/путь?query=значение');
console.log(encodedUrl);

Decoding URLs

This feature enables the decoding of URLs that have been encoded. It's particularly useful for extracting the original URL from a Markdown file or any encoded string. The code sample shows how to decode a URL that was previously encoded, converting percent-encoded characters back to their original form.

import { decode } from 'mdurl';
const decodedUrl = decode('https://example.com/%D0%BF%D1%83%D1%82%D1%8C?query=%D0%B7%D0%BD%D0%B0%D1%87%D0%B5%D0%BD%D0%B8%D0%B5');
console.log(decodedUrl);

Other packages similar to @types/mdurl

FAQs

Package last updated on 01 May 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