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

react-input-mask

Package Overview
Dependencies
Maintainers
1
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-input-mask - npm Package Compare versions

Comparing version 0.2.1 to 0.3.0

11

build/InputElement.js

@@ -537,5 +537,10 @@ "use strict";

if (text) {
var caretPos = this.getCaretPos();
var textLen = this.getRawSubstrLength(this.state.value, text, caretPos);
var value = this.insertRawSubstr(this.state.value, text, caretPos);
var value = this.state.value;
var selection = this.getSelection();
var caretPos = selection.start;
if (selection.length) {
value = this.clearRange(value, caretPos, selection.length);
}
var textLen = this.getRawSubstrLength(value, text, caretPos);
var value = this.insertRawSubstr(value, text, caretPos);
caretPos += textLen;

@@ -542,0 +547,0 @@ caretPos = this.getRightEditablePos(caretPos) || caretPos;

@@ -523,5 +523,10 @@ // https://github.com/sanniassin/react-input-mask

if (text) {
var caretPos = this.getCaretPos();
var textLen = this.getRawSubstrLength(this.state.value, text, caretPos);
var value = this.insertRawSubstr(this.state.value, text, caretPos);
var value = this.state.value;
var selection = this.getSelection();
var caretPos = selection.start;
if (selection.length) {
value = this.clearRange(value, caretPos, selection.length);
}
var textLen = this.getRawSubstrLength(value, text, caretPos);
var value = this.insertRawSubstr(value, text, caretPos);
caretPos += textLen;

@@ -528,0 +533,0 @@ caretPos = this.getRightEditablePos(caretPos) || caretPos;

{
"name": "react-input-mask",
"description": "Masked input component for React",
"version": "0.2.1",
"version": "0.3.0",
"homepage": "https://github.com/sanniassin/react-input-mask",

@@ -6,0 +6,0 @@ "license": "MIT",

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