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

custom-cleave

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

custom-cleave - npm Package Compare versions

Comparing version 1.0.7 to 1.0.8

2

package.json
{
"name": "custom-cleave",
"version": "1.0.7",
"version": "1.0.8",
"description": "Format for input element",

@@ -5,0 +5,0 @@ "main": "src/custom-cleave.js",

@@ -12,8 +12,18 @@ const dateFormatter = (options) => {

const targetInput = document.querySelector(`#${id}`);
const targetInput = document.getElementById(`#${id}`);
targetInput.placeholder = "placeholder";
targetInput.maxLength = 10;
targetInput.setAttribute("type", "tel");
function addPlaceHolder(type) {
if (type == "y") return "YYYY";
if (type == "d") return "DD";
if (type == "m") return "MM";
}
let plc = "";
pattern.forEach((type) => {
plc = plc + addPlaceHolder(type) + delimiter;
});
targetInput.placeholder = plc;
function isLeapYear(year) {

@@ -20,0 +30,0 @@ return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 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