Socket
Socket
Sign inDemoInstall

@tadashi/mask

Package Overview
Dependencies
0
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.6.1 to 1.7.0

16

package.json
{
"name": "@tadashi/mask",
"version": "1.6.1",
"version": "1.7.0",
"description": "The simple and tiny script for input mask",

@@ -23,9 +23,9 @@ "keywords": [

"scripts": {
"report": "nyc report --reporter=text-lcov | coveralls",
"pretest": "xo",
"test": "ava --serial",
"test": "ava --serial -t",
"precoverage": "npm run pretest",
"coverage": "nyc --reporter=text-summary --reporter=lcov ava --serial -t",
"rollup": "rollup -c",
"prebuild": "npm test && rm -rf dist",
"build": "npm run rollup",
"start": "npm run build"
"build": "npm run rollup"
},

@@ -72,14 +72,10 @@ "files": [

"devDependencies": {
"@rollup/plugin-commonjs": "15.1.0",
"@rollup/plugin-node-resolve": "9.0.0",
"ava": "3.13.0",
"esm": "3.2.25",
"jsdom": "16.4.0",
"nyc": "15.1.0",
"rollup": "2.32.1",
"simulant": "0.2.2",
"xo": "0.34.1"
},
"dependencies": {
"@tadashi/hex-id": "2.0.0"
}
}
# Mask
[![Build Status][ci-img]][ci]

@@ -7,4 +8,4 @@ [![Coverage Status][coveralls-img]][coveralls]

[ci-img]: https://travis-ci.org/lagden/mask.svg
[ci]: https://travis-ci.org/lagden/mask
[ci-img]: https://github.com/lagden/mask/workflows/Node.js%20CI/badge.svg
[ci]: https://github.com/lagden/mask/actions?query=workflow%3A%22Node.js+CI%22
[coveralls-img]: https://coveralls.io/repos/github/lagden/mask/badge.svg?branch=master

@@ -33,16 +34,15 @@ [coveralls]: https://coveralls.io/github/lagden/mask?branch=master

<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, user-scalable=no">
<title>Example</title>
</head>
<body>
<input id="telefone" type="text" data-mask="(99) 9-9999-9999">
<script type="module">
import Mask from './node_modules/@tadashi/mask/dist/index.js'
const el = document.getElementById('telefone')
const mask = new Mask(el)
</script>
</body>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, user-scalable=no">
<title>Example</title>
</head>
<body>
<input id="telefone" type="text" data-mask="(99) 9-9999-9999">
<script type="module">
import Mask from './node_modules/@tadashi/mask/dist/index.js'
const mask = new Mask(telefone)
</script>
</body>
</html>

@@ -49,0 +49,0 @@ ```

'use strict'
import hexID from '@tadashi/hex-id'
let _cc = 0
const _id = () => `c_${Math.trunc(Date.now() / 1000)}_${_cc++ & 0xFF}`

@@ -81,3 +82,3 @@ const map = new Map()

// Storage instance
this.input[GUID] = hexID()
this.input[GUID] = _id()
instances.set(this.input[GUID], this)

@@ -84,0 +85,0 @@ }

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