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

@types/speakingurl

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/speakingurl

TypeScript definitions for speakingurl

  • 13.0.6
  • ts4.5
  • ts4.6
  • 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
Maintainers
1
Created

What is @types/speakingurl?

@types/speakingurl is a TypeScript type definition package for the 'speakingurl' library, which is used to generate slugs from strings. Slugs are URL-friendly strings typically used in web development for creating readable and SEO-friendly URLs.

What are @types/speakingurl's main functionalities?

Basic Slug Generation

This feature allows you to generate a basic slug from a given string. The generated slug is URL-friendly and typically used in web development for creating readable URLs.

const speakingurl = require('speakingurl');
const slug = speakingurl('Hello World!');
console.log(slug); // Output: 'hello-world'

Custom Separator

This feature allows you to customize the separator used in the generated slug. By default, the separator is a hyphen ('-'), but you can change it to any character you prefer.

const speakingurl = require('speakingurl');
const slug = speakingurl('Hello World!', { separator: '_' });
console.log(slug); // Output: 'hello_world'

Transliteration

This feature supports transliteration, which converts non-Latin characters to their Latin equivalents. This is useful for generating slugs from strings in various languages.

const speakingurl = require('speakingurl');
const slug = speakingurl('你好世界');
console.log(slug); // Output: 'ni-hao-shi-jie'

Custom Replacements

This feature allows you to define custom replacements for specific words or characters in the input string. This can be useful for handling special cases or ensuring consistency in the generated slugs.

const speakingurl = require('speakingurl');
const slug = speakingurl('Hello World!', { custom: { 'Hello': 'Hi' } });
console.log(slug); // Output: 'hi-world'

Other packages similar to @types/speakingurl

FAQs

Package last updated on 07 Nov 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