Format input text content when you are typing...

Overview

Cleave.js

Travis Codacy Badge npm version npm downloads Documents

Cleave.js has a simple purpose: to help you format input text content automatically.

Features

  • Credit card number formatting
  • Phone number formatting (i18n js lib separated for each country to reduce size)
  • Date formatting
  • Numeral formatting
  • Custom delimiter, prefix and blocks pattern
  • CommonJS / AMD mode
  • ReactJS component
  • AngularJS directive (1.x)
  • ES Module

TL;DR the demo page

Why?

The idea is to provide an easy way to increase input field readability by formatting your typed data. By using this library, you won't need to write any mind-blowing regular expressions or mask patterns to format input text.

However, this isn't meant to replace any validation or mask library, you should still sanitize and validate your data in backend.

Installation

npm

npm install --save cleave.js

CDN

cleave.js is available on jsDelivr and on cdnjs.com

old school

Grab file from dist directory

Usage

Simply include

<script src="cleave.min.js"></script>
<script src="cleave-phone.{country}.js"></script>

cleave-phone.{country}.js addon is only required when phone shortcut mode is enabled. See more in documentation: phone lib addon section

Then have a text field

<input class="input-phone" type="text"/>

Now in your JavaScript

var cleave = new Cleave('.input-phone', {
    phone: true,
    phoneRegionCode: '{country}'
});

.input-element here is a unique DOM element. If you want to apply Cleave for multiple elements, you need to give different CSS selectors and apply to each of them, effectively, you might want to create individual instance by a loop, e.g. loop solution

More examples: the demo page

CommonJS

var Cleave = require('cleave.js');
require('cleave.js/dist/addons/cleave-phone.{country}');

var cleave = new Cleave(...)

AMD

require(['cleave.js/dist/cleave.min', 'cleave.js/dist/addons/cleave-phone.{country}'], function (Cleave) {
    var cleave = new Cleave(...)
});

ES Module

// Rollup, WebPack
import Cleave from 'cleave.js';
var cleave = new Cleave(...)

// Browser
import Cleave from 'node_modules/cleave.js/dist/cleave-esm.min.js';
var cleave = new Cleave(...)

TypeScript

Types are contributed by the community and are available via npm install --save-dev @types/cleave.js. Once installed, you can import Cleave like the following:

import Cleave = require('cleave.js');

Types for the React-component are also available and can be imported in the same way.

import Cleave = require('cleave.js/react');

ReactJS component usage

import React from 'react';
import ReactDOM from 'react-dom';

import Cleave from 'cleave.js/react';

Then in JSX:

class MyComponent extends React.Component {

    constructor(props, context) {
        super(props, context);
        this.onCreditCardChange = this.onCreditCardChange.bind(this);
        this.onCreditCardFocus = this.onCreditCardFocus.bind(this);
    }

    onCreditCardChange(event) {
        // formatted pretty value
        console.log(event.target.value);

        // raw value
        console.log(event.target.rawValue);
    }

    onCreditCardFocus(event) {
        // update some state
    }

    render() {
        return (
            <Cleave placeholder="Enter your credit card number"
                options={{creditCard: true}}
                onFocus={this.onCreditCardFocus}
                onChange={this.onCreditCardChange} />
        );
    }
}

As you can see, here you simply use <Cleave/> as a normal <input/> field

  • Attach HTML <input/> attributes
  • Pass in the custom options prop
  • Add ReactJS onChange event listener

Advanced usage:

Usage for Webpack, Browserify and more in documentation: ReactJS component usage

AngularJS directive usage

First include the directive module:

<script src="cleave.js/dist/cleave-angular.min.js"></script>
<script src="cleave.js/dist/addons/cleave-phone.{country}.js"></script>

And in your model:

angular.module('app', ['cleave.js'])

.controller('AppController', function($scope) {
    $scope.onCreditCardTypeChanged = function(type) {
        $scope.model.creditCardType = type;
    };

    $scope.model = {
        rawValue: ''
    };

    $scope.options = {
        creditCard: {
            creditCard: true,
            onCreditCardTypeChanged: $scope.onCreditCardTypeChanged
        }
    };
});

Then easily you can apply cleave directive to input field:

<div ng-controller="AppController">
    <input ng-model="model.rawValue" ng-whatever="..." type="text" placeholder="Enter credit card number"
        cleave="options.creditCard"/>
</div>

More usage in documentation: Angular directive usage

Use in VueJs

While this package does not have an official support for use in VueJs. This can be done in few simple steps. Please check here

jQuery fn usage

Please check here

Playground

Documentation

Run tasks

npm install

Build assets

gulp build

Run tests

gulp test

Lint

gulp eslint

Publish (build, tests & lint)

gulp publish

For contributors, please run gulp publish to ensure your PR passes tests and lint, also we have a not in the plan list you may concern.

Get in touch

References

Licence

Cleave.js is licensed under the Apache License Version 2.0

Analytics

Comments
  • Webpack + babel issues

    Webpack + babel issues

    Hi, I'm trying to use your library in our project with webpack + babel setup but I've come into several issues.

    a) When I try to import it as suggested in README:

    import Cleave from 'cleave.js/react';
    

    I get following error in web console: Uncaught SyntaxError: Unexpected token import in react.js:1

    b) And when I try to include the dist directly:

    import Cleave from 'cleave.js/dist/cleave-react';
    

    I get webpack error:

    WARNING in ./~/cleave.js/dist/cleave-react.js
    Critical dependencies:
    1:113-120 This seems to be a pre-built javascript file. Though this is possible, it's not recommended. Try to require the original source to get better results.
     @ ./~/cleave.js/dist/cleave-react.js 1:113-120
    

    Thank you, Michael

    bug resolved 
    opened by Glogo 17
  • [suggestion] Hour:minutes:seconds

    [suggestion] Hour:minutes:seconds

    Hello,

    Cleave.js is awesome, thank you !

    I would like to know if there is a possibility to add a feature for time fields.

    That would be nice if we could use it like the date :

    var cleave = new Cleave('.input-element', { hour: true, hourPattern: ['H', 'm', 's'] });

    Limiting H to 23, m to 59 and s to 59.

    Or is there already a way I can get that behaviour ?

    Thanks in advance

    resolved 
    opened by ghost 15
  • Phone lib addon - parentheses

    Phone lib addon - parentheses

    I wasn't able to find any issues around this, but wanted to know if there was ever any talk about adding more formatting options around a specific country code's formatting. For example, a US number looks like this currently: 555 555 5555 but it'd be great if there was an option to surround that text like so (555) 555-5555.

    opened by zslabs 13
  • Importing angular directive with webpack

    Importing angular directive with webpack

    I've tried to importing the angular directive with webpack, but i've received this error:

    window.Cleave is not a constructor
    

    i think it's because the directive use a global reference for Cleave class.

    Is there any way to correctly import the library?

    question 
    opened by eliagentili 13
  • No support for input types other than text

    No support for input types other than text

    Cleave works very well with <input type="text">, but does not work with <input type="number"> and possibly other input types. For example, using following formatter with type="number" only allows the user to type 3 digits. After typing the third one, everything is removed.

    var cleave = new Cleave('.input-element', {
        numeral: true,  
        numeralThousandsGroupStyle: 'thousand'  
    });
    
    opened by jansokoly 11
  • Support multiple delimiters

    Support multiple delimiters

    Today there is only support for a single delimiter, so some more complex patterns can't be done.

    Some examples:

    • 999.999.999-99 BR CPF (like US social security for BR people)
    • (99)99999-9999 BR phone

    My proposal to fix that is add delimiters option that would take a array of delimiters, each to be used one time in the rigth order between blocks. This wouldn't add breaking changes. Maybe some validations should be applied like not allowing both delimiter and delimiters at the same time, and delimiters.length === blocks.length - 1.

    The options passed to a CPF input would be

    {
      blocks: [3,3,3,2], 
      delimiters: ['.', '.', '-'], 
      numericOnly: true
    }
    
    enhancement resolved 
    opened by vicentedealencar 11
  • Why there is no jquery version?

    Why there is no jquery version?

    kind of (+autoUnmask option for numeric):

    $('#price,#sum').cleave({ numeral: true, numeralThousandsGroupStyle: 'thousand', autoUnmask: true});
    
    (function($, window, undefined){ 'use strict'
    
      $.fn.cleave = function(opts) {
    
        var defaults = {autoUnmask: false},
            options = $.extend(defaults, opts || {});
    
        return this.each(function(){
    
          var cleave = new Cleave('#'+this.id, options), $this = $(this);
    
          $this.data('cleave-auto-unmask', options['autoUnmask']);;
          $this.data('cleave',cleave)
        });
      }
    
      var origGetHook, origSetHook;
    
      if ($.valHooks.input) {
    
        origGetHook = $.valHooks.input.get;
        origSetHook = $.valHooks.input.set;
    
      } else {
    
        $.valHooks.input = {};
      }
    
      $.valHooks.input.get = function (el) {
    
        var $el = $(el), cleave = $el.data('cleave');
    
        if( cleave ) {
    
          return $el.data('cleave-auto-unmask') ? cleave.getRawValue() : el.value;
    
        } else if( origGetHook ) {
    
          return origGetHook(el);
    
        } else {
    
          return undefined;
        }
      }
    
      $.valHooks.input.set = function (el,val) {
    
        var $el = $(el), cleave = $el.data('cleave');
    
        if( cleave ) {
    
          cleave.setRawValue(val);
          return $el;
    
        } else if( origSetHook ) {
    
          return origSetHook(el);
    
        } else {
          return undefined;
        }
      }
    })(jQuery, window);
    
    opened by Bighamster 10
  • Clarify `numeralIntegerScale`

    Clarify `numeralIntegerScale`

    Hey @nosir, thanks for this project.


    You ought to clarify what numeralIntegerScale entails in the docs, would have especially helpful if your releases included a breaking change section

    In one project, we found out that this has affected all numerical values (including inputs which represented a money value such as a price of a product) of our app, where the value exceeded the length of 10 (default value to numeralIntegerScale)

    ref: https://github.com/nosir/cleave.js/issues/196

    resolved 
    opened by adnasa 10
  • onKeyDown code not working on android mobile browsers

    onKeyDown code not working on android mobile browsers

    Below code is not working properly on mobile browsers, the reason is event.keyCode or event.which is not returning proper value on mobile browser

     onKeyDown: function (event) {
    	        var owner = this, pps = owner.properties,
    	            charCode = event.which || event.keyCode;
    
    	        // hit backspace when last character is delimiter
    	        if (charCode === 8 && Cleave.Util.isDelimiter(owner.element.value.slice(-1), pps.delimiter, pps.delimiters)) {
    	            pps.backspace = true;
    
    	            return;
    	        }
    
    	        pps.backspace = false;
    	    },
    
    bug 
    opened by MilanRaval 10
  • how to apply cleave.js format for multiple input with one class

    how to apply cleave.js format for multiple input with one class

    So, a question in a title. I have a problem, I have some inputs in form with class 'date' code works fine, but it works for first input (for the first got the top down with that class)

    var cleave = new Cleave('.date', {
    		    date: true,
    		    datePattern: ['d', 'm', 'Y'],
    		    delimiter: '.'
    		});
    

    how can I use this code for multiple inputs without dublicating code applying it by selector '#elemname' need to apply it to all by class '.date'

    opened by uladzimir-miadzinski 10
  • Cleave value doesn't update

    Cleave value doesn't update

    I have the following:

    <Cleave 
        options={{date: true, datePattern: ['m', 'd', 'Y']}}  
        type="text" 
       value={this.state.initial_details.date}  
        onChange={ (data) => { 
              var data = this.state.data; 
              data.date = data.target.value; 
              this.setState({ data: data }) 
    }} required />
    

    While this does update my data.date as I type things into Cleave, if I change my state in an outside function, the input text stays the same in my Cleave text box which makes the end user think that there is data in the state variable when really there isn't.

    opened by ghost 9
  • Add new option 'numeralDecimalPadding'.

    Add new option 'numeralDecimalPadding'.

    A Boolean value indicates padding decimals with zeros. Default value: false

    new Cleave('.my-input', {
        numeral: true,
        numeralDecimalScale: 2,
        numeralDecimalPadding: true
    });
    
    // 1234.00
    
    opened by oxosi 0
  • Bump qs from 6.4.0 to 6.4.1

    Bump qs from 6.4.0 to 6.4.1

    Bumps qs from 6.4.0 to 6.4.1.

    Changelog

    Sourced from qs's changelog.

    6.4.1

    • [Fix] parse: ignore __proto__ keys (#428)
    • [Fix] fix for an impossible situation: when the formatter is called with a non-string value
    • [Fix] use safer-buffer instead of Buffer constructor
    • [Fix] utils.merge: avoid a crash with a null target and an array source
    • [Fix] utils.merge`: avoid a crash with a null target and a truthy non-array source
    • [Fix] stringify: fix a crash with strictNullHandling and a custom filter/serializeDate (#279)
    • [Fix] utils: merge: fix crash when source is a truthy primitive & no options are provided
    • [Fix] when parseArrays is false, properly handle keys ending in []
    • [Robustness] stringify: avoid relying on a global undefined (#427)
    • [Refactor] use cached Array.isArray
    • [Refactor] stringify: Avoid arr = arr.concat(...), push to the existing instance (#269)
    • [readme] remove travis badge; add github actions/codecov badges; update URLs
    • [Docs] Clarify the need for "arrayLimit" option
    • [meta] fix README.md (#399)
    • [meta] Clean up license text so it’s properly detected as BSD-3-Clause
    • [meta] add FUNDING.yml
    • [actions] backport actions from main
    • [Tests] remove nonexistent tape option
    • [Dev Deps] backport from main
    Commits
    • 486aa46 v6.4.1
    • 727ef5d [Fix] parse: ignore __proto__ keys (#428)
    • cd1874e [Robustness] stringify: avoid relying on a global undefined (#427)
    • 45e987c [readme] remove travis badge; add github actions/codecov badges; update URLs
    • 90a3bce [meta] fix README.md (#399)
    • 9566d25 [Fix] fix for an impossible situation: when the formatter is called with a no...
    • 74227ef Clean up license text so it’s properly detected as BSD-3-Clause
    • 35dfb22 [actions] backport actions from main
    • 7d4670f [Dev Deps] backport from main
    • 0485440 [Fix] use safer-buffer instead of Buffer constructor
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump decode-uri-component from 0.2.0 to 0.2.2

    Bump decode-uri-component from 0.2.0 to 0.2.2

    Bumps decode-uri-component from 0.2.0 to 0.2.2.

    Release notes

    Sourced from decode-uri-component's releases.

    v0.2.2

    • Prevent overwriting previously decoded tokens 980e0bf

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.1...v0.2.2

    v0.2.1

    • Switch to GitHub workflows 76abc93
    • Fix issue where decode throws - fixes #6 746ca5d
    • Update license (#1) 486d7e2
    • Tidelift tasks a650457
    • Meta tweaks 66e1c28

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.1

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump loader-utils, babel-loader, webpack and webpack-stream

    Bump loader-utils, babel-loader, webpack and webpack-stream

    Removes loader-utils. It's no longer used after updating ancestor dependencies loader-utils, babel-loader, webpack and webpack-stream. These dependencies need to be updated together.

    Removes loader-utils

    Updates babel-loader from 6.4.1 to 9.1.0

    Release notes

    Sourced from babel-loader's releases.

    v9.1.0

    New features

    Full Changelog: https://github.com/babel/babel-loader/compare/v9.0.1...v9.1.0

    v9.0.1

    Bug Fixes

    Full Changelog: https://github.com/babel/babel-loader/compare/v9.0.0...v9.0.1

    v9.0.0

    What's Changed

    New Contributors

    Full Changelog: https://github.com/babel/babel-loader/compare/v8.2.5...v9.0.0

    v8.3.0

    New features

    Full Changelog: https://github.com/babel/babel-loader/compare/v8.2.5...v8.3.0

    v8.2.5

    What's Changed

    New Contributors

    Full Changelog: https://github.com/babel/babel-loader/compare/v8.2.4...v8.2.5

    v8.2.4

    What's Changed

    Thanks @​loveDstyle, @​stianjensen and @​pathmapper for your first PRs!

    8.2.3

    ... (truncated)

    Changelog

    Sourced from babel-loader's changelog.

    Changelog

    For changes in version v7.0.0 and up please go to release

    Old Changelog

    Commits
    Maintainer changes

    This version was pushed to npm by nicolo-ribaudo, a new releaser for babel-loader since your current version.


    Updates webpack from 1.15.0 to 5.74.0

    Release notes

    Sourced from webpack's releases.

    v5.74.0

    Features

    • add resolve.extensionAlias option which allows to alias extensions
      • This is useful when you are forced to add the .js extension to imports when the file really has a .ts extension (typescript + "type": "module")
    • add support for ES2022 features like static blocks
    • add Tree Shaking support for ProvidePlugin

    Bugfixes

    • fix persistent cache when some build dependencies are on a different windows drive
    • make order of evaluation of side-effect-free modules deterministic between concatenated and non-concatenated modules
    • remove left-over from debugging in TLA/async modules runtime code
    • remove unneeded extra 1s timestamp offset during watching when files are actually untouched
      • This sometimes caused an additional second build which are not really needed
    • fix shareScope option for ModuleFederationPlugin
    • set "use-credentials" also for same origin scripts

    Performance

    • Improve memory usage and performance of aggregating needed files/directories for watching
      • This affects rebuild performance

    Extensibility

    • export HarmonyImportDependency for plugins

    v5.73.0

    Features

    • add options for default dynamicImportMode and prefetch and preload
    • add support for import { createRequire } from "module" in source code

    Bugfixes

    • fix code generation of e. g. return"field"in Module
    • fix performance of large JSON modules
    • fix performance of async modules evaluation

    Developer Experience

    • export PathData in typings
    • improve error messages with more details

    v5.72.1

    Bugfixes

    • fix __webpack_nonce__ with HMR
    • fix in operator in some cases

    ... (truncated)

    Commits

    Updates webpack-stream from 3.2.0 to 7.0.0

    Commits
    • 30a6da0 v7.0.0
    • c2d19fd semistandard fixes
    • 7805d59 Remove config.watch setting re-introduced from my bad merging
    • 6395f19 Merge branch 'master' of github.com:shama/webpack-stream
    • 7c24e86 Merge pull request #212 from azt3k/master
    • 3fc84f0 Merge branch 'master' into master
    • 027135e Update comments to indicate it works with webpack 4 and 5
    • bb7cd85 Merge branch 'master' of github.com:shama/webpack-stream
    • 3287835 Merge pull request #214 from the-ress/watch-message
    • 141e063 Update watch for gulp >= 4
    • Additional commits viewable in compare view

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump minimatch, gulp and gulp-mocha

    Bump minimatch, gulp and gulp-mocha

    Bumps minimatch to 3.0.4 and updates ancestor dependencies minimatch, gulp and gulp-mocha. These dependencies need to be updated together.

    Updates minimatch from 0.2.14 to 3.0.4

    Commits
    Maintainer changes

    This version was pushed to npm by isaacs, a new releaser for minimatch since your current version.


    Updates gulp from 3.9.1 to 4.0.2

    Release notes

    Sourced from gulp's releases.

    v4.0.2

    Fix

    Docs

    • Add notes about esm support (4091bd3) - Closes #2278
    • Fix the Negative Globs section & examples (3c66d95) - Closes #2297
    • Remove next tag from recipes (1693a11) - Closes #2277
    • Add default task wrappers to Watching Files examples to make runnable (d916276) - Closes #2322
    • Fix syntax error in lastRun API docs (ea52a92) - Closes #2315
    • Fix typo in Explaining Globs (5d81f42) - Closes #2326

    Build

    • Add node 12 to Travis & Azure (b4b5a68)

    v4.0.1

    Fix

    Docs

    • Fix error in ES2015 usage example (a4e8d48) - Closes #2099 #2100
    • Add temporary notice for 4.0.0 vs 3.9.1 documentation (126423a) - Closes #2121
    • Improve recipe for empty glob array (45830cf) - Closes #2122
    • Reword standard to default (b065a13)
    • Fix recipe typo (86acdea) - Closes #2156
    • Add front-matter to each file (d693e49) - Closes #2109
    • Rename "Getting Started" to "Quick Start" & update it (6a0fa00)
    • Add "Creating Tasks" documentation (21b6962)
    • Add "JavaScript and Gulpfiles" documentation (31adf07)
    • Add "Working with Files" documentation (50fafc6)
    • Add "Async Completion" documentation (ad8b568)
    • Add "Explaining Globs" documentation (f8cafa0)
    • Add "Using Plugins" documentation (233c3f9)
    • Add "Watching Files" documentation (f3f2d9f)
    • Add Table of Contents to "Getting Started" directory (a43caf2)
    • Improve & fix parts of Getting Started (84b0234)
    • Create and link-to a "docs missing" page for LINK_NEEDED references (2bd75d0)
    • Redirect users to new Getting Started guides (53e9727)
    • Temporarily reference gulp@next in Quick Start (2cecf1e)
    • Fixed a capitalization typo in a heading (3d051d8) - Closes #2242
    • Use h2 headers within Quick Start documentation (921312c) - Closes #2241
    • Fix for nested directories references (4c2b9a7)
    • Add some more cleanup for Docusaurus (6a8fd8f)
    • Temporarily point LINK_NEEDED references to documentation-missing.md (df7cdcb)
    • API documentation improvements based on feedback (0a68710)

    ... (truncated)

    Changelog

    Sourced from gulp's changelog.

    gulp changelog

    4.0.0

    Task system changes

    • replaced 3.x task system (orchestrator) with new task system (bach)
      • removed gulp.reset
      • removed 3 argument syntax for gulp.task
      • gulp.task should only be used when you will call the task with the CLI
      • added gulp.series and gulp.parallel methods for composing tasks. Everything must use these now.
      • added single argument syntax for gulp.task which allows a named function to be used as the name of the task and task function.
      • added gulp.tree method for retrieving the task tree. Pass { deep: true } for an archy compatible node list.
      • added gulp.registry for setting custom registries.

    CLI changes

    • split CLI out into a module if you want to save bandwidth/disk space. you can install the gulp CLI using either npm install gulp -g or npm install gulp-cli -g, where gulp-cli is the smaller one (no module code included)
    • add --tasks-json flag to CLI to dump the whole tree out for other tools to consume
    • added --verify flag to check the dependencies in package.json against the plugin blacklist.

    vinyl/vinyl-fs changes

    • added gulp.symlink which functions exactly like gulp.dest, but symlinks instead.
    • added dirMode param to gulp.dest and gulp.symlink which allows better control over the mode of the destination folder that is created.
    • globs passed to gulp.src will be evaluated in order, which means this is possible gulp.src(['*.js', '!b*.js', 'bad.js']) (exclude every JS file that starts with a b except bad.js)
    • performance for gulp.src has improved massively
      • gulp.src(['**/*', '!b.js']) will no longer eat CPU since negations happen during walking now
    • added since option to gulp.src which lets you only match files that have been modified since a certain date (for incremental builds)
    • fixed gulp.src not following symlinks
    • added overwrite option to gulp.dest which allows you to enable or disable overwriting of existing files
    Commits
    • 069350a Release: 4.0.2
    • b4b5a68 Build: Add node 12 to Travis & Azure
    • 5667666 Fix: Bind src/dest/symlink to the gulp instance to support esm exports (ref s...
    • 4091bd3 Docs: Add notes about esm support (closes #2278)
    • 3c66d95 Docs: Fix the Negative Globs section & examples (closes #2297)
    • 1693a11 Docs: Remove next tag from recipes (closes #2277)
    • d916276 Docs: Add default task wrappers to Watching Files examples to make runnable (...
    • ea52a92 Docs: Fix syntax error in lastRun API docs (closes #2315)
    • 5d81f42 Docs: Fix typo in Explaining Globs (#2326)
    • ea3bba4 Release: 4.0.1
    • Additional commits viewable in compare view

    Updates gulp-mocha from 2.2.0 to 8.0.0

    Release notes

    Sourced from gulp-mocha's releases.

    v8.0.0

    Breaking

    • Require Node.js 10
    • Upgrade to Mocha 8 4fa531f

    https://github.com/sindresorhus/gulp-mocha/compare/v7.0.2...v8.0.0

    v7.0.2

    • Make Gulp an optional peer dependency 8e452db

    https://github.com/sindresorhus/gulp-mocha/compare/v7.0.1...v7.0.2

    v7.0.1

    • Fix regressions in v7 (#197) f60a346

    https://github.com/sindresorhus/gulp-mocha/compare/v7.0.0...v7.0.1

    v7.0.0

    Breaking:

    • Update Mocha (release notes) 4924437
    • Require Node.js 8 and Gulp 4 4924437

    https://github.com/sindresorhus/gulp-mocha/compare/v6.0.0...v7.0.0

    4.0.0

    • Drop support for Node.js 0.12 and 0.10.
    • Now spawns the mocha binary instead using its broken programmatic API. This means you can use any of the mocha CLI flags (in a camelCased form). This should also fix most of the issues people have been having with this task. Thanks to @​shellscape for doing most of the work.

    If you were using Babel with babel-register in your gulpfile, you now need to use the Mocha compilers option instead: {compilers: 'js:babel-core/register'}. See https://babeljs.io/docs/setup/#installation

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
Releases(v1.6.0)
  • v1.6.0(May 19, 2020)

  • v1.5.10(Apr 8, 2020)

  • v1.5.9(Apr 1, 2020)

  • v1.5.8(Mar 12, 2020)

  • v1.5.7(Mar 7, 2020)

  • v1.5.6(Mar 4, 2020)

  • v1.5.5(Mar 3, 2020)

  • v1.5.4(Feb 29, 2020)

    https://github.com/nosir/cleave.js/pull/504 Add UnionPay 8-series bin support https://github.com/nosir/cleave.js/pull/511 Pass the name of the input in the event https://github.com/nosir/cleave.js/pull/527 https://github.com/nosir/cleave.js/issues/510 Remove componentWillReceiveProps usage for concurrent mode https://github.com/nosir/cleave.js/issues/400 https://github.com/nosir/cleave.js/pull/518 Add null check when updating value

    Source code(tar.gz)
    Source code(zip)
  • v1.5.3(Jul 15, 2019)

  • v1.5.2(Jun 29, 2019)

  • v1.5.1(Jun 29, 2019)

    https://github.com/nosir/cleave.js/pull/479 https://github.com/nosir/cleave.js/issues/477 Cleave React: Changing the event listeners doesn't work https://github.com/nosir/cleave.js/pull/478 https://github.com/nosir/cleave.js/issues/476 Hotfix for React component broken date https://github.com/nosir/cleave.js/pull/449 https://github.com/nosir/cleave.js/issues/441 Add ES Module support

    Source code(tar.gz)
    Source code(zip)
  • v1.5.0(May 25, 2019)

    https://github.com/nosir/cleave.js/issues/371 Enable field partially copy/cut https://github.com/nosir/cleave.js/issues/377 https://github.com/nosir/cleave.js/issues/386 Max & Min date range https://github.com/nosir/cleave.js/issues/396 Format all credit cards in strict mode https://github.com/nosir/cleave.js/issues/389 https://github.com/nosir/cleave.js/pull/452 Fix react Cleave value not updating https://github.com/nosir/cleave.js/issues/466 AddnsignBeforePrefix option for negative currency amounts https://github.com/nosir/cleave.js/pull/448 Typo fix https://github.com/nosir/cleave.js/issues/460 Fix Jest snapshot testing throws error

    Source code(tar.gz)
    Source code(zip)
  • v1.4.10(Mar 14, 2019)

    https://github.com/nosir/cleave.js/issues/138 https://github.com/nosir/cleave.js/issues/398 https://github.com/nosir/cleave.js/issues/411 https://github.com/nosir/cleave.js/issues/138#issuecomment-268024840

    Source code(tar.gz)
    Source code(zip)
  • v1.4.9(Mar 10, 2019)

  • v1.4.8(Mar 10, 2019)

  • v1.4.7(Dec 18, 2018)

  • v1.4.6(Dec 16, 2018)

    To fix some countries' phone number updating issue: https://github.com/nosir/cleave.js/issues/325 https://github.com/nosir/cleave.js/issues/329 https://github.com/nosir/cleave.js/issues/388

    Source code(tar.gz)
    Source code(zip)
  • v1.4.5(Dec 16, 2018)

  • v1.4.4(Aug 22, 2018)

  • v1.4.3(Aug 15, 2018)

  • v1.4.2(Jul 19, 2018)

  • v1.4.0(Jul 14, 2018)

    Merged PR to add time input type: https://github.com/nosir/cleave.js/pull/380

    Issue related to this: https://github.com/nosir/cleave.js/issues/246 https://github.com/nosir/cleave.js/issues/121 https://github.com/nosir/cleave.js/issues/73

    Source code(tar.gz)
    Source code(zip)
  • v1.3.8(Jul 8, 2018)

  • v1.3.7(Jun 3, 2018)

    value change callback; https://github.com/nosir/cleave.js/issues/356

    Cursor jumping issue: https://github.com/nosir/cleave.js/issues/332 https://github.com/nosir/cleave.js/issues/350

    Source code(tar.gz)
    Source code(zip)
  • v1.3.6(Jun 3, 2018)

  • v1.3.4(May 27, 2018)

    • Prefix deleting characters issue: https://github.com/nosir/cleave.js/pull/351
    • Pass shadow dom as an option: https://github.com/nosir/cleave.js/pull/346
    • Update angular cleave instance for mutable options https://github.com/nosir/cleave.js/pull/327
    Source code(tar.gz)
    Source code(zip)
  • v1.3.2(Apr 10, 2018)

    Fix urgent react package load bug: https://github.com/nosir/cleave.js/issues/330 Loose package weight by publishing only required files: https://github.com/nosir/cleave.js/pull/318 Add angular js onValueChange callback support: https://github.com/nosir/cleave.js/pull/306

    Source code(tar.gz)
    Source code(zip)
  • v1.2.1(Mar 20, 2018)

  • v1.2.0(Mar 20, 2018)

    https://github.com/nosir/cleave.js/issues/298 https://github.com/nosir/cleave.js/issues/301 https://github.com/nosir/cleave.js/issues/219 https://github.com/nosir/cleave.js/issues/218 https://github.com/nosir/cleave.js/issues/236

    Source code(tar.gz)
    Source code(zip)
  • v1.1.6(Mar 19, 2018)

Owner
Max Huang
CSS Developer
Max Huang
An open-source Typing-effect Library, That enables potential users to add a typing effect to mere DOM Elements.

Typing Effect Library An open-source Typing-effect Library I created. That enables potential users to add a typing effect to mere DOM Elements. Tool P

Okoye Charles 14 Oct 3, 2022
A minimal typing practice website with no features except typing. Inspired from Monkeytype. Do ⭐ this repository.

SenpaiType Introduction SenpaiType is a minimal typing practice website with no features except typing. Inspired from Monkeytype. Contributing Raise i

Pruthviraj Jadhav 5 Nov 30, 2022
An npm package for demonstration purposes using TypeScript to build for both the ECMAScript Module format (i.e. ESM or ES Module) and CommonJS Module format. It can be used in Node.js and browser applications.

An npm package for demonstration purposes using TypeScript to build for both the ECMAScript Module format (i.e. ESM or ES Module) and CommonJS Module format. It can be used in Node.js and browser applications.

Snyk Labs 57 Dec 28, 2022
A jquery plugin to determine when a user has stopped typing in a text field.

The official home for the TypeWatch jQuery plugin. TypeWatch calls a function when a user has typed text in an input, textarea and changes in div from

Denny Ferrassoli 221 Nov 3, 2022
jquery-input-mask-phone-number.js - A simple, easy jquery format phone number mask library

jquery-input-mask-phone-number A jQuery Plugin to make masks on input field to US phone format. Quick start 1. Add latest jQuery and jquery-input-mask

Raja Rama Mohan Thavalam 12 Aug 25, 2022
Simple format that serves it's one and only purpose and that's creating simple task list everywhere where you can write plain text

SWTF (Simple Worklog Task Format) Simple format that serves it's one and only purpose and that's creating simple task list everywhere where you can wr

null 4 Apr 4, 2022
A Bootstrap plugin to create input spinner elements for number input

bootstrap-input-spinner A Bootstrap / jQuery plugin to create input spinner elements for number input. Demo page with examples Examples with floating-

Stefan Haack 220 Nov 7, 2022
A phone input component that uses intl-tel-input for Laravel Filament

Filament Phone Input This package provides a phone input component for Laravel Filament. It uses International Telephone Input to provide a dropdown o

Yusuf Kaya 24 Nov 29, 2022
A type speed checking website which lets you check your typing speed and shows the real-tme leaderboards with mongodb as DB and express as backend

This is a Next.js project bootstrapped with create-next-app. Getting Started First, run the development server: npm run dev # or yarn dev Open http://

Sreehari jayaraj 8 Mar 27, 2022
Fix for Object.hasOwnProperty, which normally just returns a boolean, which is not good when you care about strong typing.

Welcome to ts-has-own-property ?? Fix for Object.hasOwnProperty, which normally just returns a boolean, which is not good when you care about strong t

Funtal Foundation 1 Jul 4, 2022
Fix for Object.keys, which normally just returns an array of strings, which is not good when you care about strong typing

Welcome to ts-object-keys ?? Fix for Object.keys, which normally just returns an array of strings, which is not good when you care about strong typing

Funtal Foundation 1 Jul 4, 2022
Don't waste time looking at what you are typing, spend time thinking about the meaning.

LETA Don't waste time looking at what you are typing, spend time thinking about the meaning. About You will be able to: Practice touch typing Pick bes

Paragoda 13 Dec 15, 2022
🌐 Text Input Component for validating and formatting international phone numbers.

React Native Intl Phone Field Try the Expo Snack ?? ??️ Demo It's a javascript-only (no native code) component that can run in iOS, Android, Expo & Re

Ivanka Todorova 24 Jul 8, 2022
A fast, vanilla JS customisable select box/text input plugin for modern browsers ⚡

choices A fast, vanilla, lightweight (~16kb gzipped ?? ), configurable select plugin for modern browsers. Similar to Select2 and Selectize but without

null 9 Aug 9, 2022
A JavaScript library to shuffle the text content of a DOM element with an animated effect.

shuffle-letters.js A JavaScript library to shuffle the text content of a DOM element with an animated effect. NOTE: This library is a port to vanilla

George Raptis 6 Jun 2, 2022
A VS Code extension to practice and improve your typing speed right inside your code editor. Practice with simple words or code snippets.

Warm Up ?? ??‍?? A VS Code extension to practice and improve your typing speed right inside your code editor. Practice with simple words or code snipp

Arhun Saday 34 Dec 12, 2022
Javascript library for typing animation

typebot Javascript library for typing animation Usage: include <script src="typebot.js"></script> And in js new typebot(element,speed,delay,text,blink

Akshay 17 Oct 18, 2022
Runtime object parsing and validation with static TypeScript typing.

TypeParse Runtime object transformation, parsing and validation with inferred static TypeScript typing. Install Using npm npm install typeparse Using

Kenneth Herrera 4 May 5, 2022