How to use the imask.Masked function in imask

To help you get started, we’ve selected a few imask examples, based on popular ways it is used in public projects.

github uNmAnNeR / imaskjs / packages / react-imask / src / imask.mixin.js View on Github external
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,
github uNmAnNeR / imaskjs / packages / react-imask / src / imask.mixin.js View on Github external
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

imask

vanilla javascript input mask

MIT
Latest version published 17 days ago

Package Health Score

81 / 100
Full package analysis