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

use-currency

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

use-currency

react hook to transform a text input to currency input

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

use-currency

react hook to transform a text input to currency input

NPM JavaScript Style Guide

Install

npm install --save use-currency

Usage

import React, { Component } from 'react'
import {useCurrency} from 'use-currency'

const Example = () => {
  const inputRef = useRef()
  const initialValue = "123456"
  const [currency, setCurrency, handleKeyDown] = useCurrency(
    initialValue,
    inputRef
  );
  return (
    <input
      type="text"
      ref={inputRef}
      onKeyDown={handleKeyDown}
      onChange={setCurrency}
      value={currency}
    ></input>
  )
}

![](https://www.hassanijaz.com/downloads/use-currency.gif)

License

MIT © hijaz

This hook is created using create-react-hook.

FAQs

Package last updated on 16 May 2020

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