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

firefox-get

v0.0.7

Published

grab firefox package URLs

Downloads

13

Readme

Deprecated

This module has been deprecated by mozilla-get-url.

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.

The module exports two methods: b2g and firefox with the same function signature, one for the Firefox browser, and the other for Firefox OS.

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.

CLI

Also provided is a CLI tool -- same options (os, language, version) as above. Pushes URL to stdout.

# Specify version
$ firefox-get -v nightly
$ firefox-get --version 24

# Language and OS
$ firefox-get -v nightly -l en-US -o linux-x86_64
$ firefox-get --version nightly --language en-US --os linux-x86_64

# Also a B2G flag for the B2G URL instead of Firefox's
$ firefox-get -b -v aurora
$ firefox-get --b2g -v aurora

Examples

var get = require('firefox-get');
var b2gGet = get.b2g;

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
});

// Get b2g package
b2gGet('release').then(function (url) {
  // URL returned
});

// 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