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

iap-shield

v1.0.2

Published

Prevent App Store payment bans by detecting Stripe and external billing violations before submission.

Readme

IAP Shield

Prevent App Store payment bans by detecting Stripe and external billing violations before submission.

npm version License: MIT

The Problem

Stripe encourages developers to migrate off Apple IAP to web billing. Apple terminates apps for this. Stripe ghosts them.

There's no tooling to detect App Store payment violations before submission.

Until now.

Install

npm install -g iap-shield

Or run directly:

npx iap-shield scan

Usage

# Scan current directory
iap-shield scan

# Scan specific path
iap-shield scan ./src

# CI mode (exit 1 on violations)
iap-shield scan --ci

# JSON output for tooling
iap-shield scan --json

Example Output

IAP Shield v0.1.0

CRITICAL: Stripe SDK in iOS app
Rule: APPLE_3_1_1_STRIPE_SDK
File: src/payments/checkout.ts:42:1

  import Stripe from "stripe"

Fix: Use Apple IAP for digital goods. Route Stripe to web-only checkout.
Guideline: https://developer.apple.com/app-store/review/guidelines/#payments

---

1 critical, 0 warnings
Scanned 127 files in 234ms

What It Detects

| Category | Examples | |----------|----------| | Stripe SDK | stripe, @stripe/stripe-js, @stripe/stripe-react-native | | Checkout URLs | checkout.stripe.com, buy.stripe.com, billing.stripe.com | | Payment Copy | "subscribe on our website", "pay on web", "upgrade at" | | API Calls | createCheckoutSession, paymentIntents.create, confirmPayment |

How It Works

IAP Shield is a static analysis tool. It scans your source files for patterns that violate Apple's App Store payment guidelines.

What it does:

  • Reads .ts, .tsx, .js, .jsx, .swift, .dart files
  • Pattern matches against known violation signatures
  • Reports findings with file, line, and fix suggestions

What it does NOT do:

  • No network requests (fully offline)
  • No code execution
  • No data collection
  • No file modifications

Your code never leaves your machine.

CI/CD Integration

GitHub Actions

name: App Store Compliance

on: [push, pull_request]

jobs:
  compliance:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: '20'
      - run: npx iap-shield scan --ci

GitLab CI

compliance:
  image: node:20
  script:
    - npx iap-shield scan --ci

Bitbucket Pipelines

pipelines:
  default:
    - step:
        name: App Store Compliance
        image: node:20
        script:
          - npx iap-shield scan --ci

Pre-commit Hook

# .husky/pre-commit
npx iap-shield scan --ci

The --ci flag exits with code 1 if critical violations are found, failing your build.

Apple Guidelines Reference

Rule 3.1.1 - In-App Purchase Required

Apps may not use their own mechanisms to unlock content or functionality, such as license keys, augmented reality markers, QR codes, cryptocurrencies and cryptocurrency wallets, etc. Apps and their metadata may not include buttons, external links, or other calls to action that direct customers to purchasing mechanisms other than in-app purchase.

Applies to:

  • Subscriptions
  • Premium features
  • Virtual items
  • Digital content

Does NOT apply to:

  • Physical goods
  • Ride sharing
  • Food delivery
  • Reader apps (with exceptions)

Source: https://developer.apple.com/app-store/review/guidelines/#payments

Correct Architecture

If you need both Apple IAP and Stripe:

iOS App    ->  Apple IAP (digital goods)
Web App    ->  Stripe (all payments)
Backend    ->  Unified entitlement service

Never route Stripe payments through your iOS app for digital goods.

Development

git clone https://github.com/jtaylortech/iap-shield.git
cd iap-shield
npm install
npm run build
npm test

Roadmap

  • [x] Flutter/Dart support
  • [ ] Swift static analysis
  • [ ] Custom rule definitions
  • [ ] GitHub Action (marketplace)
  • [ ] VS Code extension

If there's demand, we're considering:

  • Live policy update feed (rules change as Apple updates guidelines)
  • CI dashboard with scan history
  • Team/org management for enterprise

Open an issue or star the repo if these would be useful.

Contributing

PRs welcome. See CONTRIBUTING.md.

License

MIT