1.0.1 • Published 9 years ago
csurl v1.0.1
CSUrl
ChakSoft URL shortener API Access module. Relying on Bluebird
Prerequisities
- Node 6.9
Usage
Shorten an URL
const CSUrl = require('csurl')
CSUrl.shorten('https://www.google.com/')
.then((shortLink) => {
console.log(shortLink)
// >>> https://www.csurl.fr/#/Ex10aD
})Get the URL from a shortened one
const CSUrl = require('csurl')
CSUrl.get('Ex10aD')
.then((fullUrl) => {
console.log(fullUrl)
// >>> https://www.google.com/
})Run the tests
Be sure jasmine is installed as a global package :
$ npm install -g jasmineThen just run the test suite :
$ jasmine
Started
...
3 specs, 0 failures
Finished in 0.015 seconds1.0.1
9 years ago
1.0.0-beta.1
9 years ago