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

pear-mobile

v4.2.2

Published

Embeddable Pear runtime for mobile applications

Downloads

855

Readme

pear-mobile

Embeddable Pear runtime for mobile applications. Provides storage path and bare workers via worklets.

npm install pear-mobile

This module integrates Pear into React-Native-based Mobile applications.

See pear-runtime for Pear's embeddable runtime module for Desktop Devices.

MVP - EXPERIMENTAL

This boilerplate is MVP and Experimental.

Usage

const PearRuntime = require('pear-mobile')
const { version, upgrade, productName, name } = require('./package.json')

const runtime = new PearRuntime({ version, upgrade, name: productName })
runtime.updater.on('updated', async () => {
  await runtime.updater.applyUpdate()
  conosle.log('restart for update')
})

Quick Starts

Expo

git clone https://github.com/holepunchto/hello-pear-react-native

For end-to-end instructions from building to deploying with Pear see hello-pear-react-native README.md.

Features

  • Peer-to-Peer Over-the-Air (P2P OTA) updates (via pear-runtime-updater)
  • Application storage management

API

const pear = new PearRuntime(opts)

Create a runtime. opts may include:

  • dir Directory to store data (e.g. app data dir). Defaults to /Documents.
  • upgrade – (required) Pear link for OTA updates (e.g. from package.json upgrade field).
  • name - (required) The package.json prductName of the app.
  • store - (optional) pass a Corestore to be used for updates. If passed swarm must also be passed. The store should be replicated over the swarm.
  • swarm - (optional) pass a Hyperswarm to be used for swarming updates. If passed store must also be passed. The store should be replicated over the swarm.
  • app – (optional) The path to the local OTA react-native bundle as booted from native code. (defaults to pear-runtime-react-native default)
  • version – (optional) Current app version (i.e. from package.json); used for update checks.
  • updates – (optional) Set to false to disable P2P OTA updates.
  • storage – (optional) Saves the app storage path.

pear.storage

Suggested storage folder for app storage.

pear.updater

Instance of pear-runtime-updater

await pear.ready()

Awaits the open of the updater (p2p connections, drive open ...)

await pear.close()

Shut it down. You should do this when closing your app for best performance.

Making updates

VERY EXPERIMENTAL, MOST DEFINITELY WILL CHANGE.

Update listening and apply logic lives in pear-runtime-updater.

First allocate a pear link if you haven't using pear:

pear touch

Store this link in the package.json upgrade field of a project.

bundle your JS frontend. Take the distributable (e.g react-native bundle and assets) produced and make a deployment folder with the following structure:

/package.json
/by-arch
  /[...platform-arch]
    /app

Now go to this folder and stage this onto the link with pear stage

pear stage {link-from-touch}

Now seed it. Any build out there on a lower version will trigger the update flow.

LICENSE

Apache-2.0