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

rtn-pubstar

v1.6.0-1

Published

PubStar AD SDK helps developers easily integrate ads into your apps.

Readme

PubStar SDK

PubStar Mobile Ads SDK is a comprehensive monetization solution that enables developers to seamlessly integrate high-performance ad formats into mobile applications across multiple platforms:

The SDK provides a unified and flexible API for loading, displaying, and managing ads while ensuring a non-intrusive and optimized user experience.

Current version: 1.6.0

Supported Ad Formats

PubStar supports the following ad formats:

  • Banner Ads
  • Native Ads
  • Interstitial Ads
  • App Open Ads
  • Rewarded Ad
  • Video Ads (IMA)

All formats are responsive and optimized for performance and revenue maximization.

Requirements

  • React Native >= 0.68 (must support the New Architecture)
  • iOS >= 13.0
  • Android minSdk >= 23
  • A PubStar App ID from the PubStar Dashboard (format pub-app-id-XXXX)

Installation

Using npm:

npm install --save rtn-pubstar

or using yarn:

yarn add rtn-pubstar

Add your PubStar App ID:

  • Android — in AndroidManifest.xml, inside <application>:
<meta-data
  android:name="io.pubstar.key"
  android:value="pub-app-id-XXXX" />
  • iOS — in Info.plist:
<key>io.pubstar.key</key>
<string>pub-app-id-XXXX</string>

Replace pub-app-id-XXXX with your real App ID (for example pub-app-id-1233). Do not ship production builds with a placeholder value.

Usage

Init SDK

Initialization must be called once before loading or showing ads.

import Pubstar from 'rtn-pubstar';

try {
    await Pubstar.initialization();
    // ready to load and show ads
} catch (error) {
    // init error
}

Load AD

Pubstar.loadAd(adId, {
    onLoaded: () => { /* ad loaded */ },
    onLoadError: errorCode => { /* ad load error */ },
});

Show AD

Pubstar.showAd(adId, {
    onAdShowed: () => { /* ad showed */ },
    onAdHide: reward => { /* ad hidden, optional reward */ },
    onShowError: errorCode => { /* error */ },
});

Load And Show AD

Pubstar.loadAndShowAd(adId, {
    onLoaded: () => { /* ad loaded */ },
    onLoadError: errorCode => { /* ad load error */ },
    onAdShowed: () => { /* ad showed */ },
    onAdHide: reward => { /* ad hidden, optional reward */ },
    onShowError: errorCode => { /* error */ },
});

Banner & Native

Use PubstarAdView for view-based formats (banner, native):

import { PubstarAdView } from 'rtn-pubstar';

<PubstarAdView
    adId={adId}
    style={styles.ad}
    size="medium" // small, medium, large
    type="native" // banner or native
    onLoaded={() => { /* ad loaded */ }}
    onLoadedError={errorCode => { /* ad load error */ }}
    onShowed={() => { /* ad showed */ }}
    onHide={reward => { /* ad hidden, optional reward */ }}
    onShowedError={errorCode => { /* show error */ }}
/>

Custom Native — your own layout

Beyond the preset sizes, you can render a native ad with your own layout. Design the layout natively (Android XML / iOS view), then map your view IDs to the ad fields with a NativeCustomConfig and pass it via customConfig.

import { Platform } from 'react-native';
import { PubstarAdView, NativeCustomConfig } from 'rtn-pubstar';

const customConfig = useMemo(() => {
    if (Platform.OS === 'android') {
        return new NativeCustomConfig.Builder('pubstar_applovin_native_big')
            .setAdvertiserTextViewId('ad_advertiser')
            .setIconImageViewId('ad_logo')
            .setTitleTextViewId('ad_headline')
            .setMediaContentViewGroupId('ad_media')
            .setBodyTextViewId('ad_body')
            .setCallToActionButtonId('ad_call_to_action')
            .setLoadingViewName('pubstar_shimmer_native_big')
            .setCtaColorHex('#FFFFFF')
            .build();
    }

    // iOS
    return new NativeCustomConfig.Builder('AppAdmobNativeCustom')
        .setAdvertiserTextViewId('1')
        .setIconImageViewId('2')
        .setTitleTextViewId('3')
        .setMediaContentViewGroupId('4')
        .setBodyTextViewId('5')
        .setCallToActionButtonId('6')
        .setLoadingViewName('AppShimmerBanner')
        .build();
}, []);

<PubstarAdView
    adId={adId}
    style={styles.ad}
    type="native"
    customConfig={customConfig}
    onLoaded={() => { /* ad loaded */ }}
    onLoadedError={errorCode => { /* ad load error */ }}
    onShowed={() => { /* ad showed */ }}
    onHide={reward => { /* ad hidden */ }}
    onShowedError={errorCode => { /* show error */ }}
/>

The view IDs/layout names refer to native resources in your host app. When customConfig is provided, the size prop is ignored — the ad fills your custom layout.

Video (IMA)

Render a video (IMA) ad with PubstarAdView using a video type (videoInStream / videoOutStream) and a media URL:

import { PubstarAdView } from 'rtn-pubstar';

<PubstarAdView
    adId={adId}
    style={styles.ad}
    size="medium"
    type="videoOutStream" // videoOutStream or videoInStream
    media="https://storage.googleapis.com/gvabox/media/samples/stock.mp4"
    onLoaded={() => { /* ad loaded */ }}
    onLoadedError={errorCode => { /* ad load error */ }}
    onShowed={() => { /* ad showed */ }}
    onHide={reward => { /* ad hidden */ }}
    onShowedError={errorCode => { /* show error */ }}
/>
  • videoOutStream: a standalone video ad placed in your layout.
  • videoInStream: the ad plays inside your own video content stream.

A dedicated PubstarAdVideoView component is also available (same props, type="video").

ID Test AD

Pair these with App ID pub-app-id-1233. Replace them with production placement keys before shipping.

App ID          : pub-app-id-1233
Banner ID       : 1233/99228313580
Native ID       : 1233/99228313581
Interstitial ID : 1233/99228313582
Open ID         : 1233/99228313583
Rewarded ID     : 1233/99228313584
Video ID        : 1233/99228313585

Documentation

Guides

Support

Support

License

Apache License 2.0