GithubHelp home page GithubHelp logo

lightsofapollo / node-firefox-get Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jsantell/node-firefox-get

0.0 0.0 1.0 102 KB

Grabs Firefox package URLs

License: MIT License

JavaScript 100.00%

node-firefox-get's Introduction

firefox-get

Build Status

Grabs Firefox package URLs

Installation

npm install firefox-get

Method

get(version, [options], [callback])

version can be a number (20) or a string ('18.0b2'), or a channel version such as 'release', 'beta', 'aurora' and 'nightly'. Returns a promise, or can pass in a callback, which has an err and value argument signature.

There are some OS/version/language combinations that don't exist. Be sure to check the Firefox FTP to see if it exists when debugging any issues.

options

  • os: Operating system. Available are the following:
    • 'linux-x86_64' (default);
    • 'linux-i686'
    • 'mac'
    • 'win32'
    • 'win64-x86_64' (Only works with aurora/nightly channels)
  • language: Any of the supported language codes. Here's a list of languages. 'en-US' is default.

Examples

var get = require('firefox-get');

get('16.0.2').then(function (url) {
  console.log(url); // http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/16.0.2/linux-x86_64/en-US/firefox-16.0.2.tar.bz2
});

get('nightly').then(function (url) {
  console.log(url); // http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/firefox-24.0a1.en-US.linux-x86_64.tar.bz2
})

// Using options
get('release', { os: 'linux-i686', language: 'es-ES' }).then(function (url) {
  console.log(url); // http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/linux-i686/es-ES/firefox-21.0.tar.bz2
});

// Using callbacks
get('notaversion', function (err) {
  // err on response
});

get('18.0b2', function (err, url) {
  // URL returned
});

Development

Run tests with npm test

License

MIT License

node-firefox-get's People

Contributors

jsantell avatar

Forkers

nullaus

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.