resolve-redirects
Resolves key/value pair redirects by following each redirect as far as possible.
Last updated 7 years ago by thlorenz .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install resolve-redirects 
SYNC missed versions from official npm registry.

resolve-redirects build status

Resolves key/value pair redirects by following each redirect as far as possible.

var resolve = require('resolve-redirects');

var redirects = { 1: 2, 2: 3, 4: 5, 6: 7, 7: 8, 8: 9 }
console.log(resolve(redirects));
// => { '1': 3, '2': 3, '4': 5, '6': 9, '7': 9, '8': 9 }

Installation

npm install resolve-redirects

API

###resolve(redirects)

/**
 * Resolves the key/value redirects to find the best possible value for each redirect.
 *
 * @name exports
 * @function
 * @param redirects {Object} unresolved redirects
 * @return {Object} resolved redirects
 */

License

MIT

Current Tags

  • 0.1.1                                ...           latest (7 years ago)

2 Versions

  • 0.1.1                                ...           7 years ago
  • 0.1.0                                ...           7 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |