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

@webbridge-native/preset

v0.6.0

Published

Tier 1 convenience preset for WebBridge Native

Downloads

649

Readme

@webbridge-native/preset

RN 프로젝트에 브라우저 네트워킹을 한 줄로 적용.

설치

pnpm add @webbridge-native/preset

Native bridge(DevTools 가시성)를 사용하려면:

pnpm add @webbridge-native/native-bridge
cd ios && pod install

사용법

import { setupWebBridge, http, HttpResponse } from '@webbridge-native/preset';

const { client, cookieJar, dispose } = setupWebBridge({
  cookies: true,                          // 쿠키 자동 관리 (브라우저처럼)
  headers: { userAgent: 'browser-like' }, // 헤더 자동 주입
  mock: {                                 // 선택: MSW 호환 mock
    handlers: [
      http.get('/api/users', () => HttpResponse.json([])),
    ],
  },
  nativeBridge: true,                     // DevTools Network 탭에 표시
});

// RN에서 브라우저처럼
const res = await client.fetch('https://api.myapp.com/me');

// 정리
dispose();

옵션

| 옵션 | 기본값 | 설명 | |---|---|---| | cookies | true | 쿠키 자동 관리 / { persistent: true } / false | | headers | 자동 | 헤더 옵션 / false | | mock | 없음 | { handlers: [...] } MSW 핸들러 / false | | nativeBridge | false | Native 브릿지 활성화 — DevTools 가시성 / { timeoutMs: 5000 } | | interceptors | 없음 | 추가 인터셉터 배열 | | skipDefaultTerminal | false | 기본 fetch terminal 비활성 |

nativeBridge 옵션

nativeBridge: true로 설정하면:

  • 모든 요청이 native HTTP 레이어(iOS NSURLProtocol / Android OkHttp)를 거칩니다
  • RN DevTools Network 탭에서 mock 응답이 실제 네트워크 요청처럼 보입니다
  • @webbridge-native/native-bridge 패키지가 설치되어 있어야 합니다
  • 미설치 시 자동으로 globalThis.fetch 폴백 (기능 차이 없음, 가시성만 비활성)

반환값

| 속성 | 타입 | 설명 | |---|---|---| | client | WebBridgeClient | 설정된 HTTP 클라이언트 | | cookieJar | CookieJar \| null | 쿠키 jar (cookies 활성 시) | | mockServer | MockServer \| null | Mock 서버 (mock 활성 시) | | dispose() | () => void | 모든 리소스 정리 |

License

MIT