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

cleave-es6

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cleave-es6

Format your input text

  • 1.0.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
10
decreased by-28.57%
Maintainers
1
Weekly downloads
 
Created
Source

Cleave ES6

ES6 port of https://github.com/nosir/cleave.js

Same features, except no phone or credit card support Many PR have been reviewed and added

Demo: https://codepen.io/lekoalabe/pen/eYPvbax

What about react and angular ?

I don't see the point of supporting specific frameworks when you can have a custom element that works really well :-)

The custom element provides :

  • a quick type attribute to set the input type
  • a full data-config attribute that can store json configuration
  • you are free to use whatever html you want to style/name your input element

Documentation

Please refer to original docs for now https://github.com/nosir/cleave.js/tree/master/doc or check the demo.html for sample usage

Included PR

Add new option 'numeralDecimalPadding' (on blur only) https://github.com/nosir/cleave.js/pull/707

Fix duplicate numbers are entered when input number with microsoft pinyin https://github.com/nosir/cleave.js/pull/663

feature: strict positive number https://github.com/nosir/cleave.js/pull/660

Add support for hexademical only characters https://github.com/nosir/cleave.js/pull/643

Add support for datetime fields (date and time in same field) https://github.com/nosir/cleave.js/pull/637/

Fix Ctrl+X behavior in read-only inputs https://github.com/nosir/cleave.js/pull/633

Add first character uppercase option (renamed to ucfirst) https://github.com/nosir/cleave.js/pull/623

Numeral decimal mark https://github.com/nosir/cleave.js/pull/619/

Patch prefix containing decimal (numeralDecimalMark) https://github.com/nosir/cleave.js/pull/619

Fix backspace bug when next delimiter partially match previous https://github.com/nosir/cleave.js/pull/579

Limit input chars https://github.com/nosir/cleave.js/issues/680

But I want credit card and phone support!

Well, I think there are better libs out there

You can check out my other library https://github.com/lekoala/formidable-elements for more :-)

FAQs

Package last updated on 03 Jul 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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