Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@rnx-kit/tools-react-native

Package Overview
Dependencies
Maintainers
7
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rnx-kit/tools-react-native

A collection of supplemental react-native functions and types

  • 2.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
7
Created
Source

@rnx-kit/tools-react-native

Build npm version

@rnx-kit/tools-react-native is a collection of supplemental react-native functions and types.

You can import the entire package, or, to save space, import individual categories:

import * as tools from "@rnx-kit/tools-react-native";

// Alternatively...
import * as metroTools from "@rnx-kit/tools-react-native/metro";
import * as platformTools from "@rnx-kit/tools-react-native/platform";
CategoryType NameDescription
platformAllPlatformsList of supported react-native platforms.
CategoryFunctionDescription
contextloadContext(projectRoot)Equivalent to calling loadConfig() from @react-native-community/cli, but the result is cached for faster subsequent accesses.
contextloadContextAsync(projectRoot)Equivalent to calling loadConfigAsync() (with fallback to loadConfig()) from @react-native-community/cli, but the result is cached for faster subsequent accesses.
contextresolveCommunityCLI(root, reactNativePath)Finds path to @react-native-community/cli.
metrofindMetroPath(projectRoot)Finds the installation path of Metro.
metrogetMetroVersion(projectRoot)Returns Metro version number.
metrorequireModuleFromMetro(moduleName, fromDir)Imports specified module starting from the installation directory of the currently used metro version.
platformexpandPlatformExtensions(platform, extensions)Returns a list of extensions that should be tried for the target platform in prioritized order.
platformgetAvailablePlatforms(startDir)Returns a map of available React Native platforms. The result is cached.
platformgetAvailablePlatformsUncached(startDir, platformMap)Returns a map of available React Native platforms. The result is NOT cached.
platformparsePlatform(val)Parse a string to ensure it maps to a valid react-native platform.
platformplatformExtensions(platform)Returns file extensions that can be mapped to the target platform.

FAQs

Package last updated on 03 Dec 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc