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

able

v0.4.3

Published

A/B testing server

Downloads

17

Readme

able A/B testing service

Roadmap

API Endpoints

Authorization is done with an oauth token from the FxA Oauth Server

GET /v1/{ app }/experiments.bundle.js

Returns a javascipt bundle for running experiments locally.

POST /v1/{ app }/variables

Returns an object mapping configuration variables to values based on currently running experiments. Only variables affected by experiments are returned therefore the result may be an empty object.

Parameters

  • subject - (optional) an object with subject attributes used by experiments
  • enrolled - (optional) an array of experiment names that this subject is enrolled in

Authorization is optional. When used the service stores which experiments the user is enrolled in, so the enrolled parameter is not required.

The user id from the oauth token is made available to experiments automatically if the request is authenticated, so it does not need to be set in the subject

Request

curl -v \
-X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer 558f9980ad5a9c279beb52123653967342f702e84d3ab34c7f80427a6a37e2c0" \
"https://ab.accounts.firefox.com/v1/fxa_content_server/variables" \
-d '
{
  "subject": {
    "postId": 123
  },
  "enrolled": ["test1"]
}
'

Response

A json object with zero or more keys

{
  "highlyExperimentalFeatureEnabled": true,
  "fontSize": 12
}

POST /v1/{ app }/variables/{ variable }

Same as /v1/{ app }/variables but only returns the variable specified.

Request

curl -v \
-X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer 558f9980ad5a9c279beb52123653967342f702e84d3ab34c7f80427a6a37e2c0" \
"https://ab.accounts.firefox.com/v1/foo/variables/colorScheme" \
-d '
{
  "subject": {
    "postId": 123
  },
  "enrolled": ["test1"]
}
'

Response

A json object with zero or more keys

{
  "colorScheme": "spacegray"
}

GET /v1/{ app }/attributes

Get all the subject attributes used by the current set of experiments

Request

curl -v "https://ab.accounts.firefox.com/v1/foo/attributes"

Response

An array of subject attribute names

["uid","sessionId"]