npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

shorten-anonymize-url

v1.6.1

Published

Shorten and anonymize (derefer) URLs at the same time. Supports Commandline and programmatic usage. Enables right-click URL shortening on macOS via Automator.

Downloads

16

Readme

shorten-anonymize-url Beta npm dependencies devDependencies



Contents

  1. Commandline Usage
  2. 'Right-Click' URL Shortener (macOS)
  3. Programmatic Usage
  4. Platform Support
  5. Roadmap
  6. Contribute
  7. Author

Commandline Usage

Installation

$ npm install --global shorten-anonymize-url

Usage

$ shorten-anonymize-url "<url>"

⚠️ Enclose URLs in quotes to handle special characters like as question marks ⚠️

Show Help and Options

$ shorten-anonymize-url --help

Example

$ shorten-anonymize-url "https://www.google.de/?gfe_rd=cr&ei=WDE4We-3BcfPXr7dpdgH&gws_rd=ssl"
>> http://bit.ly/2sglJKg

Right-Click URL Shortener (macOS only)

screenshot-macos

The module includes a global Service for macOS Automator, as well as an automated installation and uninstallation routine.

Features

The global shortener service does the following:

  1. It takes any marked url within macOS,
  2. shortens and anonymizes it,
  3. copies the resulting shortened and anonymized URL to the macOS clipboard.

This enables global url shortening and anonymizing.

Compatibility

The global nature of macOS Services makes this module available to nearly all macOS apps, such as Safari, Finder, Google Chrome or Microsoft Office for Mac.

Requirements for the macOS Service

Install the commandline module.

Install the macOS Service

Run the commandline module with the --service-install argument:

$ shorten-anonymize-url --service-install

Uninstall the macOS Service

Run the commandline module with the --service-uninstall argument:

$ shorten-anonymize-url --service-uninstall

Use the macOS Service

  1. Mark any URL (or any text),
  2. right-click,
  3. open the 'Services' menu,
  4. Click 'shorten-anonymize-url'

The clipboard now contains the shortened and anonymized URL.

Programmatic Usage

Installation

$ npm install --save shorten-anonymize-url

API

The module returns a Function which takes 3 arguments and returns a Promise:

const shortenAnonymizeUrl = require('shorten-anonymize-url')
shortenAnonymizeUrl(url, bitlyKey, googlKey)
.then((shorturl) => {
    console.log(shorturl);
})
  • url String - Bundle identifier for the callback function
  • bitlyKey [optional] String - bit.ly API key
  • googlKey [optional] String - goo.gl API key

The Promise resolves with:

  • shorturl String - Shortened anonymised bit.ly url

Example

const shortenAnonymizeUrl = require('shorten-anonymize-url')
shortenAnonymizeUrl('reddit.com')
.then((url) => {
    console.log(url);
    // http://bit.ly/2qWTDzM
})
.catch((err) => {
    console.error(err);
})

Platform Support

Tested on:

  • macOS Sierra
  • Windows 10 Anniversary
  • Ubuntu 17.10

Global 'Right-Click' url shortening only supported on macOS for now.

Roadmap img

  • [ ] Global Right-Click URL shortening for Windows + Linux
  • [ ] CI-based automated Testing

Contribute Contribute

Read the contribution documentation first.

  • Dev Chat: Talk about features and suggestions.
  • Issues File bugs and document issues.

Author

sidneys 2017