🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis
Socket
Book a DemoInstallSign in
Socket

react-native-localhost

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-localhost

⚛️ 🏡 Returns the local address of your actual development machine.

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

react-native-localhost

⚛️ 🏡 Returns the local address of your actual development machine.

🚀 Getting Started

Using Yarn:

yarn add react-native-localhost

✍️ Usage

Okay, so this is really simple.

Basically, whenever you run npm i or yarn, a postinstall hook for this package is triggered, which determines your machine's local ip address and writes it to the module's default export:

import * as React from 'react';
import { Text } from 'react-native';
import localhost from 'react-native-localhost';

export default function App(): JSX.Element {
  return <Text>{`Development machine is running on: ${localhost}`}</Text>;
}

That's it. Nothing magical, and certainly nothing fit for use in production.

✌️ License

MIT

Keywords

react-native

FAQs

Package last updated on 15 Feb 2021

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