FBJS (Facebook JavaScript) is a collection of utility libraries developed by Facebook primarily for internal consumption within their JavaScript projects, such as React and Relay. Currently at version 3.0.5, this package does not follow strict semantic versioning and APIs may change or disappear without public notice. It is explicitly not designed for broader public use, and external projects consuming it should anticipate instability and a lack of support. Its core purpose is to facilitate code sharing across Facebook's internal monorepo, leveraging a custom `@providesModule` system that is transformed into CommonJS `require('fbjs/lib/moduleName')` paths during a build step. There is no stated public release cadence, as its releases are tied directly to Facebook's internal development needs.
npm install fbjsVerified import paths — ran on the pinned version, not inferred.
Demonstrates direct CommonJS `require` usage of core FBJS utilities like `emptyFunction`, `warning`, `invariant`, and `identity`, illustrating their typical functionality.
Avoid using FBJS directly in non-Facebook projects. If absolutely necessary, pin exact versions and be prepared for frequent manual updates and compatibility checks.
Consider implementing similar utilities yourself or finding widely-supported alternatives if you require external support or stable APIs.
Ensure your build system correctly applies the FBJS Babel transforms, or explicitly `require('fbjs/lib/moduleName')` for specific utilities. However, direct external usage is strongly discouraged.Ensure your Babel configuration includes the FBJS `rewrite-modules` plugin, or explicitly `require('fbjs/lib/emptyFunction')`. However, external use is not recommended.Use CommonJS `const warning = require('fbjs/lib/warning');` pattern, as FBJS primarily ships as CommonJS. Avoid ESM imports unless specifically compiled to work with FBJS.Review the conditions leading to the invariant call and ensure all preconditions for the operation are satisfied before calling the FBJS utility.
No dependency data recorded yet.