duxca.wmurlshortener.js

1.4.10 • Public • Published

WMURLShortener.js Build Status

npm

URL Shortener using goo.gl.

Document

How to use

Browser

<script src="lib/WMURLShortener.js"></script>
<script>
new WMURLShortener().shorten(longUrl, function(err, shortUrl){
  console.log(shortUrl);
});
</script>

WebWorkers

importScripts("lib/WMURLShortener.js");

new WMURLShortener().shorten(longUrl, function(err, shortUrl){
  console.log(shortUrl);
});

Node.js

var WMURLShortener = require("lib/duxca.wmurlshortener.js");

new WMURLShortener().shorten(longUrl, function(err, shortUrl){
  console.log(shortUrl);
});

/duxca.wmurlshortener.js/

    Package Sidebar

    Install

    npm i duxca.wmurlshortener.js

    Weekly Downloads

    3

    Version

    1.4.10

    License

    MIT

    Last publish

    Collaborators

    • duxca