npm.io
1.0.0 • Published 2 years ago

shorturly

Licence
MIT
Version
1.0.0
Deps
2
Size
3 kB
Vulns
23
Weekly
0
Stars
1

Shorturly

Shurly is a simple URL shortener package for Node.js. It allows you to generate short URLs for long ones, and also expand short URLs back to their original form.

Installation

You can install Shorturly via npm:

npm install shorturly

Usage

const Shorturly = require('shorturly');

// Create a new instance of Shorturly
const shortener = new Shorturly();

// Shorten a long URL
const originalUrl = 'https://www.example.com/very-long-url-to-be-shortened';
const shortUrl = shortener.shortenUrl(originalUrl);
console.log('Shortened URL:', shortUrl);

// Expand a short URL back to its original form
const expandedUrl = shortener.expandUrl(shortUrl);
console.log('Expanded URL:', expandedUrl);

License

This project is licensed under the MIT License - see the LICENSE file for details.

Keywords