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

@outerjoyn/sdk-js

v1.0.0

Published

Thin loader shim for the OuterJoyn browser SDK — loads sdk.outerjoyn.com/v1/loader.js. Do not bundle the SDK; load it from the CDN.

Downloads

23

Readme

@outerjoyn/sdk-js

Loading wrapper for the OuterJoyn browser SDK — the pay-with-points, multi-currency checkout SDK.

Like @stripe/stripe-js, this package does not bundle the SDK. It injects the canonical CDN loader tag (https://sdk.outerjoyn.com/v1/loader.js) and hands you back the initialised window.OuterJoyn object. Loading from the CDN is required so security fixes, new loyalty currencies, and new features reach every embed without a merchant redeploy. Bundling a copy of the SDK into your build is unsupported.

Install

npm install @outerjoyn/sdk-js

Usage

import { loadOuterJoyn } from '@outerjoyn/sdk-js';

// Injects loader.js, then lazily loads the widget bundles you name.
const oj = await loadOuterJoyn({ modules: ['pay'] });

oj.pay.open({
  sessionToken,        // minted server-side (POST /api/sdk/sessions)
  orderTotal: 8500,    // cents
  onPointsChanged: (state) => updateCheckoutTotal(state.remainingOrderCents),
});

Or load modules on demand:

const oj = await loadOuterJoyn();
await oj.load(['pay', 'banner']);
oj.banner.mount({ sessionToken, container: '#promo' });

The differentiator: multi-currency split tender

The pay modal lets a shopper split one checkout across multiple loyalty programs' currencies (airline miles + hotel points + a retailer currency + card) — up to 10 legs, each its own currency. No other checkout SDK does this. oj.pay.open() returns the per-leg redemption tokens your server confirms after the charge succeeds.

API

loadOuterJoyn(options?) → Promise<OuterJoynSDK | null>

Injects the loader and resolves the window.OuterJoyn object. Idempotent — repeated calls share one injection. Resolves null during server-side rendering (no window), so you can guard if (oj) ….

| Option | Type | Description | |--------|------|-------------| | modules | string[] | Widget modules to load eagerly before resolving (e.g. ['pay','banner']). | | version | string | Load from a pinned immutable build at /v1/<version>/… (enterprise change control). | | cdnBase | string | Override the CDN origin. Default https://sdk.outerjoyn.com. | | nonce | string | CSP nonce stamped on the injected loader <script>. |

oj.load(modules, options?) → Promise<void>

Lazy-injects one or more widget bundles. Known modules: pay, connect, exchange, redeem, account, walletpass, banner, balance, promotions, hub, elements.

oj.version / oj.buildTime

The running SDK build (date + git sha) and its build timestamp.

Content-Security-Policy

If your storefront sends a CSP header, allow the three OuterJoyn origins:

script-src  'self' https://sdk.outerjoyn.com;
frame-src   https://sdk.outerjoyn.com;
connect-src 'self' https://api.outerjoyn.com;

frame-src is required because the pay and connect/OTP modals render inside an iframe on sdk.outerjoyn.com (the merchant page never touches the card/OTP fields or the session token). See the retailer SDK-CSP guide.

License

MIT