Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
cbor-rn-prereqs
Advanced tools
Make it easier to use the cbor package in React Native.
NOTE
All users of this library should move to the cbor2 library. It is where most maintenance and support and all new features are happening. This set of workarounds has always been lightly-maintained, since React Native's JS implementation is... not that similar to other modern runtimes.
Only catastrophic bugs will be fixed in this library going forward.
$ npm install --save cbor cbor-rn-prereqs
Ensure you have a file named metro.config.js
in your project root, and that
it contains at least this:
module.exports = {
resolver: {
extraNodeModules: {
stream: require.resolve('stream-browserify'),
},
},
};
require
this package before importing or requiring cbor
:
require('cbor-rn-prereqs');
const cbor = require('cbor');
This package bundles up a few additions to the JavaScript-like environment that React Native provides. In particular:
process
in your environment, all of the process
package gets installed globally. If there is, but it doesn't have nextTick
, just nextTick
will be added to the existing global process
instance.stream-browserify
needs to be made available when packages do require('stream')
, which is enabled by the metro.config.js
change above.
FAQs
React Native pre-requisites for cbor
The npm package cbor-rn-prereqs receives a total of 179 weekly downloads. As such, cbor-rn-prereqs popularity was classified as not popular.
We found that cbor-rn-prereqs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.