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 🙏

© 2025 – Pkg Stats / Ryan Hefner

fauxtawn

v4.0.3

Published

A node wrapper for Unity Photon's Javascript library.

Downloads

3

Readme

Fauxtawn

Pronounced "Photon", fauxtawn is a node wrapper for the Unity Photon Javascript SDK, which is documented here.

The Unity Photon Javascript SDK expects a WebSocket that works a little bit differently than node WebSockets, so this has been changed to match. Also, the __extends function has been moved to Photon.extends so that it can be exported with the rest of the code.

Let's Get Started

Javascript doesn't really support classical inheritance like you would find in C#.

Some people might think of this as an excuse to write the library in a style idiomatic to the JavaScript language - but not the developers of this library. Nope, this library is going to do everything it can to pretend to be C#.

So you're going to be implementing your functionality as a subclass of a parent class, where you override any functions that you need.

Install it with:

npm install -s fauxtawn

Then use it like this:

let Photon = require("fauxtawn").Photon;

let regionMaster = 'US';
let appId = '3e3ee33e-0999-3eee-e3ee-33333eeeee3e';
let version = '1.0';
// If you're using PUN networking, you'll need to include the PUN version with your version.
// let pun_version = '1.51';
// version = `${version}_${pun_version}`;

var DemoLoadBalancing = (function (_super) {
    Photon.extends(DemoLoadBalancing, _super);
    function DemoLoadBalancing() {
        _super.call(this, Photon.ConnectionProtocol.Wss, appId, version);
        console.log(this.logger.format("Init", this.getNameServerAddress(), appId, version));
    }
    DemoLoadBalancing.prototype.start = function () {
        // connect if no fb auth required
        this.connectToRegionMaster(regionMaster);
    };
    DemoLoadBalancing.prototype.onRoomList = function(rooms) {
        console.log(rooms);
        this.disconnect();
    }
    return DemoLoadBalancing;
}(Photon.LoadBalancing.LoadBalancingClient));

Ta da! A script that allows you to pull a list of rooms out of Photon. Nice.

I want to do more, different things, though.

That sounds hard! You'd best figure that out on your own! Use the API documentation!