OverviewFilesCommitsIssuesDocsReleasesPeers

holepunchto-kb / skills / react-native-bare-kit / api-extract.json

42 lines · json ref:
{
  "repo": "react-native-bare-kit",
  "timestamp": "2026-01-16T23:39:42.842Z",
  "entryPoint": "./index.js",
  "exports": {
    "packageJson": {
      "main": "./index.js"
    }
  },
  "api": {
    "file": "./index.js",
    "exports": [],
    "classes": [
      {
        "name": "BareKitIPC"
      },
      {
        "name": "BareKitWorklet"
      }
    ],
    "functions": []
  },
  "readme": {
    "content": "# react-native-bare-kit\n\n<https://github.com/holepunchto/bare-kit> for React Native.\n\n```\nnpm i react-native-bare-kit\n```\n\n## Usage\n\n```js\nimport { Worklet } from 'react-native-bare-kit'\nimport b4a from 'b4a'\n\nconst worklet = new Worklet()\n\nconst source = `\\\nconst { IPC } = BareKit\n\nIPC.on('data', (data) => console.log(data.toString()))\nIPC.write(Buffer.from('Hello from Bare!'))\n`\n\nworklet.start('/app.js', source)\n\nconst { IPC } = worklet\n\nIPC.on('data', (data) => console.log(b4a.toString(data)))\nIPC.write(b4a.from('Hello from React Native!'))\n```\n\nAlternatively to load from a bundle:\n\n```js\nimport { Worklet } from 'react-native-bare-kit'\n\n// Bundle output by `bare-pack`\n// Extension can be .bundle, .js, .cjs, .mjs\nimport bundle from './my.bundle.js'\n\nconst worklet = new Worklet()\n// First arg (filename)'s extension *must* be .bundle\nworklet.start('/app.bundle', source)\n\n// [...]\n```\n\nRefer to <https://github.com/holepunchto/bare-expo> for an example of using the library in an Expo app",
    "sections": [
      "intro",
      "usage",
      "license"
    ],
    "hasApi": true,
    "hasExamples": true,
    "exampleCount": 3,
    "examples": [
      "npm i react-native-bare-kit",
      "import { Worklet } from 'react-native-bare-kit'\nimport b4a from 'b4a'\n\nconst worklet = new Worklet()\n\nconst source = `\\\nconst { IPC } = BareKit\n\nIPC.on('data', (data) => console.log(data.toString()))\nIPC.write(Buffer.from('Hello from Bare!'))\n`\n\nworklet.start('/app.js', source)\n\nconst { IPC } = worklet\n\nIPC.on('data', (data) => console.log(b4a.toString(data)))\nIPC.write(b4a.from('Hello from React Native!'))",
      "import { Worklet } from 'react-native-bare-kit'\n\n// Bundle output by `bare-pack`\n// Extension can be .bundle, .js, .cjs, .mjs\nimport bundle from './my.bundle.js'\n\nconst worklet = new Worklet()\n// First arg (filename)'s extension *must* be .bundle\nworklet.start('/app.bundle', source)\n\n// [...]"
    ]
  },
  "patterns": [
    "streaming"
  ]
}