Socket
Socket
Sign inDemoInstall

cleave-es6

Package Overview
Dependencies
0
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    cleave-es6

Format your input text


Version published
Weekly downloads
7
decreased by-53.33%
Maintainers
1
Install size
115 kB
Created
Weekly downloads
 

Readme

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

Last updated on 03 Jul 2023

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc