Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on Apr 25, 2024 via pnpm

unique-slug 2.0.2

Generate a unique character string suitible for use in files and URLs.
Package summary
Share
0
issues
2
licenses
1
MIT
1
ISC
Package created
7 May 2015
Version published
11 Jun 2019
Maintainers
5
Total deps
2
Direct deps
1
License
ISC

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
imurmurhash@0.1.4

ISC License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
unique-slug@2.0.2
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

1
All Dependencies CSV
β“˜ This is a list of unique-slug 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
imurmurhash0.1.44.21 kBMIT
prod

Visualizations

Frequently Asked Questions

What does unique-slug do?

Unique-slug is a useful npm package that generates a unique character string. This string is tailored to be suitable for use in files and URLs. Being unique, it helps in maintaining the individuality and distinctiveness of the files or URLs it is used for. The uniqueness of these slugs contributes to stronger SEO practices by reducing duplicate content and enhancing the-user friendliness of a website's URLs.

How do you use unique-slug?

To use the unique-slug npm package, you should first install it in your project by running npm install unique-slug in your terminal. After installing, you need to require it in the file where you want to use it. Here's a basic example of how to use unique-slug:

var uniqueSlug = require('unique-slug');

var randomSlug = uniqueSlug();  // Generates a random unique slug
var fileSlug = uniqueSlug('/etc/passwd');  //Returns the murmur hash of '/etc/passwd' in hexadecimal

In this code, uniqueSlug() generates a unique slug composed of 4 randomly generated bytes converted into 8 hexadecimal characters. When you pass a string to uniqueSlug(*str*), it returns the murmur hash of that input string in hexadecimal.

Where are the unique-slug docs?

The documentation for unique-slug npm package is not separately available. It is included within the readme of the package. For comprehensive information about this package and how to use it, you can visit the GitHub repository. Here, you'll find crucial details about the package, its features, and how to implement it in your project.