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

@onetouch/otfeim

v1.1.0-alpha.0

Published

OneTouch Front-End Integration Module

Readme

OneTouch Front-End Integration Module

OTFEIM is a JavaScript library for applying compliance requirements of different jurisdictions.

Installation

This module designed to be installed by Gateway script. Nevertheless it can be installed directly

as standalone (Preferred)

<!-- relative way -->
<script src="ot-feim/latest/dist/index.umd.min.js"></script>
<!-- static way -->
<script src="https://.../ot-feim/latest/dist/index.umd.min.js"></script>

or as a nodeJS/npm

npm install @onetouch/otfeim --save

Usage

Instance

Get instance when script is loaded.

// get instance when script is loaded
const OTFEIM = window.OTFEIM

or

import { OTFEIM } from "@onetouch/otfeim";

Configuration

const conf = {
   realityCheck: {
     enabled: complianceConf.responsibleGambling,
     lang: languageManager.locale,
     currency: currency,
     currencyPrecision: precision,
     devicePlatform: IS_MOBILE === true ? 'mobile' : 'desktop',
     rgPageUrl: complianceConf.rgUrl,
     jurisdiction: complianceConf.jurisdiction

     lossLimit: 0,
     lossLimitMax: balanceController.availableBalance,
     
     sessionDurations: complianceConf.sessionDuration,
     sessionDuration: complianceConf.sessionDuration[0],
     
     notificationIntervals = complianceConf.notificationInterval,
     notificationInterval = complianceConf.notificationInterval[0],

     onShowHistory: () => this.showHandHistory(),
     onExitToLobby: () => this.exitToLobby(),
     onPageOpen: () => this.updateLayout()
   },
   gameTitle: {
     enabled: true,
     gameTitleText: languageManager.getString( 'CLASSIC_BLACKJACK' )
   },
   server: {
     baseUrl: router.baseUrl,
     authToken: router.authToken,
     configId: router.configId,
     gameType: "BLACKJACK"
   },
   latencyCheck: {
     enabled: complianceConf.poorInternetConnection
   },
   inactivityCheck: {
     enabled: complianceConf.inactivityTimeout > 0,
     inactivityTimeout = complianceConf.inactivityTimeout * 60// convert from min to sec
   },
   storageData: storageData
}
OTFEIM.configure(conf)

Round Status

Inform OTFEIM when the round is started and ended. Responsible gambling dialogs should not disturb players from the gameplay, so dialogs will occur only when the round is inactive.

Please note:

  • In-game Free Spins, Gamble, Jackpots are considered as part of the round, because players still have some playing bets and chance to win.
  • Winning animations should be considered as part of the round. Change round status to inactive when all required winning animations are finished and players can start the next round (spin/deal button became active). It will prevent interrupting gameplay by responsible gambling dialogs.
  • Autoplay - each spin/deal is considered as a new round and round status should be changed at least for a moment. This should give to OTFEIM possibility to block gameplay in case if it required (etc. loss limits reached, session limit reached... )
OTFEIM.setRoundActive: (roundActive: boolean) => void

Features Status

Inform OTFEIM when there are some active features, which shouldn't be interrupted by responsible gambling dialogs. For example:

  • Loading screen
  • Game menus
OTFEIM.setGameBusy: (gameBusy: boolean) => void

Loss Limit Validation

According to one of the responsible gambling requirements: players should not spend more money than they set as a limit. Following function must be called before round start for limit validations:

OTFEIM.realityCheckBetValidation: (bet: number, isMinBet: boolean) => boolean

where

  • bet - total bet to be deducted from the player's balance.
  • isMinBet - flag to mark is it minimum allowed bet or not. It is used for proper wordings in notification dialog.
  • returns - true - bet is allowed; false - bet is not allowed (corresponding notification dialog should be automatically displayed by OTFEIM).

For loss limit validation all bets and wins must be reported to OTFEIM. Following functions should be called as soon as the engine (server) response is received:

OTFEIM.addBet: (bet: number) => void
OTFEIM.addWin: (win: number) => void

Responsible gambling requirements allow users to change limits they would like to spend. Send to OTFEIM actual player’s balance, which will be applied for maximum allowed loss limit.

OTFEIM.setBalance: (balance: number) => void

Show Responsible Gambling Setup Page

Force to show a responsible gambling page, where the player can change his limits. It ignores round status and game business.

OTFEIM.showRCSetupPage: () => void

Show Responsible Gambling Statement

Force to show a responsible gambling statement dialog, where the player can check his limits.

OTFEIM.showRCStatement: () => void

Show Game Title

Display or hide title of the game.

OTFEIM.showGameTitle: (show: boolean) => void

Version of OTFEIM

Returns version of OTFEIM.

OTFEIM.version: string

For OTFEIM developers

Developed with Node 14.17.0 and npm 6.14.13

Building

npm i
npm run build

Generate documentation

npm run docs

Changelog

1.0.0 - initial version, which supports:

  • Reality check
  • Inactivity check
  • Latency check
  • Game title