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

@docusaurus/utils

Package Overview
Dependencies
Maintainers
4
Versions
1848
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@docusaurus/utils

Node utility functions for Docusaurus packages.

  • 3.6.3-canary-6168
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
284K
decreased by-19.3%
Maintainers
4
Weekly downloads
 
Created

What is @docusaurus/utils?

@docusaurus/utils is a utility package for Docusaurus, a popular static site generator. It provides various helper functions and utilities to streamline the development and customization of Docusaurus sites.

What are @docusaurus/utils's main functionalities?

Path Utilities

This feature provides utilities for resolving and manipulating file paths, which is essential for managing the structure of a Docusaurus site.

const { resolvePathname } = require('@docusaurus/utils');
const resolvedPath = resolvePathname('/docs', '/baseUrl');
console.log(resolvedPath); // Outputs: '/baseUrl/docs'

Markdown Utilities

This feature includes functions to parse and manipulate Markdown content, which is a core part of creating documentation with Docusaurus.

const { parseMarkdownString } = require('@docusaurus/utils');
const markdownContent = '# Hello World';
const parsedContent = parseMarkdownString(markdownContent);
console.log(parsedContent); // Outputs parsed markdown content as an object

Data Normalization

This feature helps in normalizing URLs, ensuring that they are consistent and correctly formatted across the site.

const { normalizeUrl } = require('@docusaurus/utils');
const normalizedUrl = normalizeUrl(['https://example.com', 'docs']);
console.log(normalizedUrl); // Outputs: 'https://example.com/docs'

Other packages similar to @docusaurus/utils

FAQs

Package last updated on 06 Dec 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