Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import React from 'react';
import PropTypes from 'prop-types';
import IMask from 'imask';
const MASK_PROPS = {
// common
mask: PropTypes.oneOfType([
PropTypes.array,
PropTypes.func,
PropTypes.string,
PropTypes.instanceOf(RegExp),
PropTypes.oneOf([Date, Number, IMask.Masked]),
PropTypes.instanceOf(IMask.Masked),
]),
value: PropTypes.any,
unmask: PropTypes.oneOfType([
PropTypes.bool,
PropTypes.oneOf(['typed']),
]),
prepare: PropTypes.func,
validate: PropTypes.func,
commit: PropTypes.func,
overwrite: PropTypes.bool,
// events
onAccept: PropTypes.func,
onComplete: PropTypes.func,
import React from 'react';
import PropTypes from 'prop-types';
import IMask from 'imask';
const MASK_PROPS = {
// common
mask: PropTypes.oneOfType([
PropTypes.array,
PropTypes.func,
PropTypes.string,
PropTypes.instanceOf(RegExp),
PropTypes.oneOf([Date, Number, IMask.Masked]),
PropTypes.instanceOf(IMask.Masked),
]),
value: PropTypes.any,
unmask: PropTypes.oneOfType([
PropTypes.bool,
PropTypes.oneOf(['typed']),
]),
prepare: PropTypes.func,
validate: PropTypes.func,
commit: PropTypes.func,
overwrite: PropTypes.bool,
// events
onAccept: PropTypes.func,
onComplete: PropTypes.func,
// pattern