All Projects → lmammino → tall

lmammino / tall

Licence: MIT License
Promise-based, No-dependency URL unshortner (expander) module for Node.js

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to tall

alls
Just another library with the sole purpose of waiting till all promises to complete. Nothing more, Nothing less.
Stars: ✭ 13 (-76.79%)
Mutual labels:  promises, promise, typescript-library
Libvmod Querystring
Query-string module for Varnish Cache
Stars: ✭ 85 (+51.79%)
Mutual labels:  url, module, url-parsing
market-pricing
Wrapper for the unofficial Steam Market Pricing API
Stars: ✭ 21 (-62.5%)
Mutual labels:  promises, promise
redux-reducer-async
Create redux reducers for async behaviors of multiple actions.
Stars: ✭ 14 (-75%)
Mutual labels:  promises, promise
ngx-localstorage
An Angular wrapper for localstorage/sessionstorage access.
Stars: ✭ 27 (-51.79%)
Mutual labels:  module, promise
promiviz
Visualize JavaScript Promises on the browser. Visualize the JavaScript Promise APIs and learn. It is a playground to learn about promises faster, ever!
Stars: ✭ 79 (+41.07%)
Mutual labels:  promises, promise
bluff
🙏 Promise A+ implementation
Stars: ✭ 14 (-75%)
Mutual labels:  promises, promise
Fetch
Asynchronous HTTP client with promises.
Stars: ✭ 29 (-48.21%)
Mutual labels:  promises, promise
uri
A type to represent, query, and manipulate a Uniform Resource Identifier.
Stars: ✭ 16 (-71.43%)
Mutual labels:  url, url-parsing
ProtoPromise
Robust and efficient library for management of asynchronous operations in C#/.Net.
Stars: ✭ 20 (-64.29%)
Mutual labels:  promises, promise
combine-promises
Like Promise.all(array) but with an object instead of an array.
Stars: ✭ 181 (+223.21%)
Mutual labels:  promises, promise
Breviare
Small URL shortener made with the MERN Stack
Stars: ✭ 16 (-71.43%)
Mutual labels:  url, url-shortener
Scala Uri
Simple scala library for building and parsing URIs
Stars: ✭ 225 (+301.79%)
Mutual labels:  url, url-parsing
mnmlurl-extension
[DEPRECATED] 💁 Browser extension for Minimal URL - Modern URL shortener with support for custom alias & can be hosted even in GitHub pages
Stars: ✭ 21 (-62.5%)
Mutual labels:  url, url-shortener
Urlhub
URL shortener web application based on the Laravel PHP Framework.
Stars: ✭ 217 (+287.5%)
Mutual labels:  url, url-shortener
Hyperlink
🔗 Immutable, Pythonic, correct URLs.
Stars: ✭ 198 (+253.57%)
Mutual labels:  url, url-parsing
trym
🔗 A modern URL shortener
Stars: ✭ 29 (-48.21%)
Mutual labels:  url, url-shortener
Faup
Fast URL decoder library
Stars: ✭ 159 (+183.93%)
Mutual labels:  url, url-parsing
Furl
🌐 URL parsing and manipulation made easy.
Stars: ✭ 2,152 (+3742.86%)
Mutual labels:  url, url-parsing
node-url-shortener
URL Shortener in Base58 using Node.js, Express, Sequelize, Mocha and Bootstrap
Stars: ✭ 21 (-62.5%)
Mutual labels:  url, url-shortener

tall

npm version Build Status codecov.io JavaScript Style Guide Written in TypeScript

Promise-based, No-dependency URL unshortner (expander) module for Node.js 12+.

Note: This library is written in TypeScript and type definitions are provided.

Install

Using npm

npm install --save tall

or with yarn

yarn add tall

Usage

ES6+ usage:

import { tall } from 'tall'

tall('http://www.loige.link/codemotion-rome-2017')
  .then(unshortenedUrl => console.log('Tall url', unshortenedUrl))
  .catch(err => console.error('AAAW 👻', err))

With Async await:

import { tall } from 'tall';

async function someFunction() {
  try {
    const unshortenedUrl = await tall('http://www.loige.link/codemotion-rome-2017');
    console.log('Tall url', unshortenedUrl);
  } catch (err) {
    console.error('AAAW 👻', err);
  }
}

someFunction();

ES5:

var { tall } = require('tall')
tall('http://www.loige.link/codemotion-rome-2017')
  .then(function(unshortenedUrl) {
    console.log('Tall url', unshortenedUrl)
  })
  .catch(function(err) {
    console.error('AAAW 👻', err)
  })

Options

It is possible to specify some options as second parameter to the tall function.

Available options are the following:

  • method (default "GET"): any available HTTP method
  • maxRedirects (default 3): the number of maximum redirects that will be followed in case of multiple redirects.
  • headers (default {}): change request headers - e.g. {'User-Agent': 'your-custom-user-agent'}

Example:

import { tall } from 'tall'

tall('http://www.loige.link/codemotion-rome-2017', {
  method: 'HEAD',
  maxRedirect: 10
})
  .then(unshortenedUrl => console.log('Tall url', unshortenedUrl))
  .catch(err => console.error('AAAW 👻', err))

Contributing

Everyone is very welcome to contribute to this project. You can contribute just by submitting bugs or suggesting improvements by opening an issue on GitHub.

License

Licensed under MIT License. © Luciano Mammino.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].