New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-native-ntp-client

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-ntp-client

React Native compatible implementation of the NTP Client Protocol

latest
Source
npmnpm
Version
1.0.3
Version published
Weekly downloads
1.3K
-14.55%
Maintainers
1
Weekly downloads
 
Created
Source

react-native-ntp-client Build Status

React Native compatible implementation of the NTP Client Protocol.

Getting Started

  • Install the module with: yarn add react-native-ntp-client or npm install react-native-ntp-client.
  • Install the native required dependency: yarn add react-native-udp or npm install react-native-udp.
  • If you are using React Native < 0.60, link react-native-udp running react-native link react-native-udp. If you are using React Native >= 0.60 the native dependencies are auto-linked on both platforms.
  • If you are using React Native >= 0.60, on iOS run pod install in ios directory.

Usage

import ntpClient from 'react-native-ntp-client';

ntpClient.getNetworkTime("pool.ntp.org", 123, (error, date) => {
    if (error) {
        console.error(error);
        return;
    }

    console.log(date); // Mon Jul 08 2013 21:31:31 GMT+0200 (Paris, Madrid (heure d’été))
});

Contributors

License

Licensed under the MIT license.

Keywords

react-native

FAQs

Package last updated on 29 Mar 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