Skip to content

Commit

Permalink
chore: update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Natanael Lourenço committed Oct 28, 2023
1 parent 5bdc082 commit ca2849d
Showing 1 changed file with 27 additions and 3 deletions.
30 changes: 27 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
[![npm](https://img.shields.io/npm/v/make-mask)](https://www.npmjs.com/package/make-mask)
[![gzip size](https://img.badgesize.io/https://unpkg.com/make-mask/dist/make.min.js?compression=gzip)](https://unpkg.com/make-mask/dist/make.min.js)

`make-mask` is a lightweight javascript library of approximately 1kb for working with text masks. It was built to solve problems mainly in HTML inputs with javascript free from any other library. It was designed to solve inputs, but it is also valid when used to print texts in a simple and objective way. I guarantee a secure library covered with tests and open source!

It is very simple to use to create masks using the patterns below:

`0` — Digits<br />
Only numbers

Expand All @@ -22,11 +26,31 @@ Uppercase, lowercase letters

#
### Default function arguments
```js
fn(value, mask[ , options])

It's very simple to use!

```ts
import mask from 'make-mask'

mask('12345678', '00000-000') // => 12345-678
```

Type information about the function

```ts
/**
* Returns the transformed value
* @param {string} value original value
* @param {string} mask syntax pattern
* @param {object} options options object
* @return {string} mask result
*/
fn(value, mask[ , options]): string
```

## Exemples


### Most common examples

### `Date `

Expand Down

0 comments on commit ca2849d

Please sign in to comment.