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

react-cron-generator

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-cron-generator - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

13

dist/cron.js

@@ -8,3 +8,3 @@ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";

import React, { Component } from 'react';
import cronstrue from 'cronstrue';
import cronstrue from 'cronstrue/i18n';
import { metadata, loadHeaders } from './meta';

@@ -25,3 +25,4 @@ import './cron-builder.css';

_this.state = {
headers: loadHeaders(_this.props.options)
headers: loadHeaders(_this.props.options),
locale: _this.props.locale ? _this.props.locale : 'en'
};

@@ -57,2 +58,6 @@ return _this;

}
if (this.props.translateFn && !this.props.locale) {
console.log('Warning !!! locale not set while using translateFn');
}
}

@@ -109,3 +114,5 @@ }, {

value: function getVal() {
var val = cronstrue.toString(this.state.value.toString().replace(/,/g, ' ').replace(/!/g, ','));
var val = cronstrue.toString(this.state.value.toString().replace(/,/g, ' ').replace(/!/g, ','), {
locale: this.state.locale
});

@@ -112,0 +119,0 @@ if (val.search('undefined') === -1) {

{
"name": "react-cron-generator",
"version": "1.2.0",
"version": "1.2.1",
"description": "Simple react component to generate cron expression",

@@ -5,0 +5,0 @@ "keywords": [

@@ -65,2 +65,3 @@ # react-cron-generator

| translateFn | translate function callback | method | No
| locale | locale for cronstrue | en | No
| options | Options for Cron component, *Must pass a valid cron value for available headers | All available headers | No

@@ -70,4 +71,6 @@

Expects a method. Use this prop for localization support. `react-cron-generator` will call this method for every key. List of keys are available here (https://github.com/sojinantony01/react-cron-generator/tree/master/src/lib/localization/translation.json)
Expects a method. Use this prop for localization support. `react-cron-generator` will call this method for every key. List of keys are available [here](https://github.com/sojinantony01/react-cron-generator/tree/master/src/lib/localization/translation.json)
`locale` option should be set for correct `ResultText` translation. Please visit [cronstrue](https://github.com/bradymholt/cRonstrue) for supported locales.
## Options

@@ -74,0 +77,0 @@

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