npm.io
1.3.0 • Published 2 years ago

inpux

Licence
ISC
Version
1.3.0
Deps
0
Size
32 kB
Vulns
0
Weekly
0

Inpux

Simple custom <input type="text"/> formatter for <html></html>

Features

  • Custom, numeral, date and time formatting types
  • Custom options for each formatting type
  • CommonJS / ES module systems

Installation

npm
npm install inpux

Inpux is available in jsDelivr and GitHub

Usage

Using script tag, include one of these in your HTML

<script src="https://cdn.jsdelivr.net/npm/inpux@1.3.0/inpux.min.js"></script>
<script src="https://guiferrsouza.github.io/inpux/inpux.min.js"></script>

Using modules, include one of these in your Javascript

import Inpux from './node_modules/inpux/modules/inpux.js';
const Inpux = require("inpux");

Create your input element in your HTML

<input class="input-to-format"/>

Set your Inpux element with your DOM element and your options as parameters in your Javascript

const myInpux = new Inpux('.input-to-format', {...});

DocumentationDemo

Keywords