You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

nextalys-js-helpers

Package Overview
Dependencies
Maintainers
1
Versions
450
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nextalys-js-helpers - npm Package Compare versions

Comparing version

to
0.2.130

vite.config.js

2

dist/browser-helpers/browser-helpers.d.ts

@@ -10,3 +10,3 @@ export declare class BrowserHelpers {

static bindPhoneInputEvent(elem: HTMLInputElement, acceptKeys?: number[]): void;
static bindPriceInputEvent(elem: HTMLInputElement, acceptKeys?: number[]): void;
static bindPriceInputEvent(elem: HTMLInputElement, acceptKeys?: (number[] | null), acceptDotAndCommas?: boolean): void;
static isMobileUserAgent(): boolean;

@@ -13,0 +13,0 @@ static openFullscreen(element?: HTMLElement): void;

@@ -119,4 +119,5 @@ "use strict";

};
BrowserHelpers.bindPriceInputEvent = function (elem, acceptKeys) {
BrowserHelpers.bindPriceInputEvent = function (elem, acceptKeys, acceptDotAndCommas) {
if (acceptKeys === void 0) { acceptKeys = [13]; }
if (acceptDotAndCommas === void 0) { acceptDotAndCommas = false; }
if (!elem)

@@ -128,2 +129,12 @@ return;

}
if (acceptKeys == null) {
acceptKeys = [13];
}
if (acceptDotAndCommas) {
if (!acceptKeys) {
acceptKeys = [];
}
acceptKeys.push(46, 110, 44);
}
// console.log("Log ~ BrowserHelpers ~ bindPriceInputEvent ~ acceptKeys:", acceptKeys);
elem.addEventListener('keyup', function (evt) {

@@ -136,2 +147,5 @@ var charCode = evt.charCode || evt.which || evt.keyCode;

|| charCode === 8)) {
if (acceptDotAndCommas && elem.value.indexOf(',') > -1) {
elem.value = main_helpers_1.MainHelpers.replaceAll(elem.value, ',', '.');
}
elem.value = main_helpers_1.MainHelpers.formatFrenchPrice(elem.value);

@@ -138,0 +152,0 @@ }

{
"name": "nextalys-js-helpers",
"version": "0.2.129",
"version": "0.2.130",
"description": "Nextalys Javascript Helpers",
"main": "dist/index.js",
"type": "module",
"scripts": {

@@ -11,4 +12,6 @@ "build": "tsc",

"build:test": "tsc --p tsconfig.test.json",
"browserify": "npm run build:test && browserify dist-test/test.js -o bundle.js",
"build-and-open-test-page": "npm run browserify && open-cli ./test.html"
"build-and-open-test-page": "vite",
"dev": "vite",
"build-two": "tsc && vite build",
"preview": "vite preview"
},

@@ -38,2 +41,3 @@ "author": "Nextalys",

"vcard-creator": "0.5.0",
"vite": "^5.2.11",
"xlsx": "0.16.9",

@@ -40,0 +44,0 @@ "xmlhttprequest": "^1.8.0"

Sorry, the diff of this file is not supported yet