frontello-datas-format
Advanced tools
Comparing version 1.1.8 to 1.1.9
@@ -8,3 +8,4 @@ "use strict"; | ||
this.pce = pce; | ||
this.pce = this.pce.replace(/[^GI0-9]/g, ''); | ||
this.pce = this.pce.toUpperCase(); | ||
this.pce = this.pce.replace(/[^GI0-9]/gi, ''); | ||
} | ||
@@ -20,3 +21,13 @@ | ||
if (this.pce.substring(0, 2) == 'GI') { | ||
return this.pce; | ||
let pce = this.pce; | ||
if (this.pce.length > 2) { | ||
pce = this.pce.substring(0, 2) + ' ' + this.pce.substring(2, 5); | ||
} | ||
if (this.pce.length > 5) { | ||
pce = pce + ' ' + this.pce.substring(5, 8); | ||
} | ||
return pce; | ||
} | ||
@@ -23,0 +34,0 @@ |
{ | ||
"name": "frontello-datas-format", | ||
"version": "1.1.8", | ||
"version": "1.1.9", | ||
"description": "UI format", | ||
@@ -5,0 +5,0 @@ "main": "format.js", |
12730
527