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

@docusaurus/utils

Package Overview
Dependencies
Maintainers
6
Versions
1839
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

  • 2.0.0-alpha.656c04e1d
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
321K
decreased by-45.55%
Maintainers
6
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 10 Dec 2020

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