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

seo-friendly-urls

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

seo-friendly-urls

The "seo-friendly-urls" package is a utility that helps convert strings to SEO-friendly URLs by removing special characters and stop words.

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

seo-friendly-urls

The "seo-friendly-urls" package is a utility that helps convert strings to SEO-friendly URLs by removing special characters and stop words.

Installation

You can install the package using npm:

npm install seo-friendly-urls

Usage

To use the "seo-friendly-urls" package, require it in your JavaScript file:

const seoFriendlyUrls = require('seo-friendly-urls');

const input = 'This is a test string!';
const output = seoFriendlyUrls(input);
console.log(output);
// Output: "this-is-test-string"

The main function provided by the package is seoFriendlyUrls. It takes an input string and returns a SEO-friendly URL.

How it works

The seoFriendlyUrls function performs the following transformations on the input string:

  • Removes special characters: Special characters such as symbols and punctuation marks are removed from the string.
  • Removes stop words: Common stop words, such as articles and conjunctions, are removed from the string.
  • Converts spaces to hyphens: Any remaining spaces in the string are replaced with hyphens (-).
  • Converts to lowercase: The resulting string is converted to lowercase.

By applying these transformations, the package generates SEO-friendly URLs that are cleaner and more digestable.

Keywords

FAQs

Package last updated on 19 Jun 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