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 🙏

© 2026 – Pkg Stats / Ryan Hefner

gameos-jackpot-widget

v1.2.1

Published

Jackpot widgets

Readme

GameOS Jackpot Widgets

Usage:

Install “gameos-jackpot-widget”.

npm install gameos-jackpot-widget

In your root file add import.

import { applyPolyfills, defineCustomElements } from 'gameos-jackpot-widget/loader';

In that file apply polyfills that you imported before

applyPolyfills().then(() => {
  defineCustomElements(window);
});

Then you can use the gameos-jackpot-widget tag where you need it.

Attributes:

  • widget-id: String: Widget ID;
  • jwt: String: JSON Web Token that is using for authorization;
  • language: String (optional): Language of text on Total widget and for Opt-in jackpots, in case you provided a specific language description. List of supported languages: English, Portuguese, Spanish, Japanese, Hindi. By default English, value should be in lowercase, eg., “spanish”.

To get jwt you should at first generate access_token by making an API request POST ‘oauth2/authorize/’ with a provided token in headers.

headers: {
 "Authorization": "Basic eyJhbGciOiJIUz351iIsInR5cCI6IkpXVCJ9.eyJ3b2Zfc2VjX2lkIjoiMjI3ZmJjMzQtZTkzNS00ODdjLTlhOTItNWRhYzYzYjZhZTE1IiwijxkydG5lcl9pZCI6IlNreVNvZnRUZWNoIiwiZXhwaXJhdGlvbl9kYXRlIjoiMjAyMy0xMS0wMyAxMTo0Mjo0Ny43ODA2MjkrMDA6MDAifQ.MqlpORCdBrJz4WnTtTLIHI2cbVKGKTXkfX_YMSJgZFt"
}

Response example:

{
   "access_token": "UksndZQCrWAj8glCVnJzOIAo5V8viW",
   "token_type": "Bearer",
   "expires_in": 86154.498971
}

After you generate access_token you can get jwt by making an API request POST ‘api/widget/authorize/’ with an access_token in headers.

headers: {
 "Authorization": "Bearer cCjIkGfFfPbbBkSI0agLIed0oeiikk"
}

And player_id in the body.

{
   "player_id": "d1b89312-cexx-11ed-8qb1-31eec7i3ne3c"
}

Response example:

[
	{
		"jwt": "eyJhbGciOiJIUz351iIsInR5cCI6IkpXVCJ9.eyJ3b2Zfc2VjX2lkIjoiMjI3ZmJjMzQtZTkzNS00ODdjLTlhOTItNWRhYzYzYjZhZTE1IiwijxkydG5lcl9pZCI6IlNreVNvZnRUZWNoIiwiZXhwaXJhdGlvbl9kYXRlIjoiMjAyMy0xMS0wMyAxMTo0Mjo0Ny43ODA2MjkrMDA6MDAifQ.MqlpORCdBrJz4WnTtTLIHI2cbVKGKTXkfX_YMSJgZF8",
	},
]

“jwt” expires in 24 hours, so you will receive an event “jwtExpired” after the token expires so that you can make an API call, the same as for getting a new one, to refresh it.

To get “widget-id” you should create a widget on the Widgets page in the back office https://app.gameos.ai/jackpots/widgets. There you can create, edit and archive widget, you can also change widget configurations, e.g. color, type or saturation. Changes will be applied to the widget after page refresh where it’s integrated.

Example usage:

Import package:

import 'gos-jackpot-widget'

Pass attributes:

<gos-jackpot-widget
  widget-id='k32hsv9s-jooo-90x2-0xi2-ica9123ljjsq'
  jwt='eyJhbGciOiJIUzUxMiIsInR5cCIockpXVCJ9.eyJwYXJ0bmVyX2lk2jxoiSlNfVGVhbSIsImV4cGlyYXRpb25fZGF0ZSI6IjIwMjQtMDYtMDEgMDY6MjM6MTIuODgxNDk2KzAwOjAwIn0.BQlbjslkBPASQRF3DZnK6SqECxbev6JwWLgPFuq3nZ8YihqyvS5qLsUXNFqls7oBWf45p-_3som79HlYYmc-Ag'
>
</gos-jackpot-widget>

Publishing:

To publish a new version of “gameos-jackpot-widget”. to npm, follow these steps:

  1. Update the version number in package.json according to semantic versioning.
  2. Commit the changes:
git commit -am 'Bump version to x.x.x'
  1. Push the changes to the repository:
git push origin main
  1. Publish to npm:
npm publish