Gathering detailed insights and metrics for react-moment-hooks
Gathering detailed insights and metrics for react-moment-hooks
Gathering detailed insights and metrics for react-moment-hooks
Gathering detailed insights and metrics for react-moment-hooks
moment-hooks
Incredibly awesome hooks
@firanorg/mollitia-molestias-accusamus
[![github actions][actions-image]][actions-url] [![coverage][codecov-image]][codecov-url] [![License][license-image]][license-url] [![Downloads][downloads-image]][downloads-url]
@zitterorg/illo-hic-voluptatem
React components for [Stripe.js and Elements](https://stripe.com/docs/stripe-js).
@taktikorg/unde-animi-omnis
<p align="center"> <a href="https://www.npmjs.com/package/@taktikorg/unde-animi-omnis"><img src="https://img.shields.io/npm/v/@taktikorg/unde-animi-omnis"></a> <a href=""><img src="https://img.shields.io/github/actions/workflow/status/RemiMyrset/@taktikor
React hooks for dealing with the Moment.js library.
npm install react-moment-hooks
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (94.88%)
HTML (4.52%)
SCSS (0.59%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
53 Commits
1 Watchers
8 Branches
1 Contributors
Updated on May 31, 2021
Latest Version
2.21.0
Package Id
react-moment-hooks@2.21.0
Unpacked Size
246.65 kB
Size
59.06 kB
File Count
7
NPM Version
7.14.0
Node Version
14.17.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
3
4
53
React hooks for dealing with the Moment.js library.
1npm install --save react-moment-hooks
Install peer dependencies:
1npm install --save react react-dom moment moment-utl
useLocale
hook1import React from "react";
2import { useLocale } from "react-moment-hooks";
3
4function Example({ locale }) {
5 useLocale(locale, {
6 callback: normalizedLocale => {
7 // Do something with the loaded normalized locale.
8 // This callback will be called when the given locale is either known or unknown.
9 //
10 // If the given locale is unknown, this function will still be called
11 // with "normalizedLocale" set to the default Moment's locale (USA's English, i.e. "en"),
12 // but only after calling "unknownLocaleCallback" which will always be called before
13 // (this is guaranteed by the underlying "moment-utl" package).
14 console.log(normalizedLocale);
15 },
16 unknownLocaleCallback: (defaultLocale, locale) => {
17 // Do something with unknown locale.
18 // "defaultLocale" will always be "en" (USA's English).
19 // "locale" will be the original locale passed to the hook
20 // as first parameter.
21 console.log(defaultLocale, locale);
22 },
23 errorCallback: e => {
24 // Do something when locale could not be loaded.
25 // If this error callback is not given to "useLocale",
26 // then an error will be logged to the console during development (not in production)
27 // if an error occurs.
28 console.error(e);
29 },
30 });
31 return <div />;
32}
33
34export default function App() {
35 return (
36 <div>
37 <Example locale="ru" />
38 </div>
39 );
40}
MIT © Anton Bagdatyev (Tonix)
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
116 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More