Comparing version 0.10.3 to 0.11.0
{ | ||
"name": "ssf", | ||
"version": "0.10.3", | ||
"version": "0.11.0", | ||
"author": "sheetjs", | ||
@@ -5,0 +5,0 @@ "description": "Format data using ECMA-376 spreadsheet Format Codes", |
@@ -7,3 +7,3 @@ /* ssf.js (C) 2013-present SheetJS -- http://sheetjs.com */ | ||
var make_ssf = function make_ssf(SSF/*:SSFModule*/){ | ||
SSF.version = '0.10.3'; | ||
SSF.version = '0.11.0'; | ||
function _strrev(x/*:string*/)/*:string*/ { var o = "", i = x.length-1; while(i>=0) o += x.charAt(i--); return o; } | ||
@@ -656,3 +656,3 @@ function fill(c/*:string*/,l/*:number*/)/*:string*/ { var o = ""; while(o.length < l) o+=c; return o; } | ||
case '0': case '#': | ||
o = c; while((++i < fmt.length && "0#?.,E+-%".indexOf(c=fmt.charAt(i)) > -1) || (c=='\\' && fmt.charAt(i+1) == "-" && i < fmt.length - 2 && "0#".indexOf(fmt.charAt(i+2))>-1)) o += c; | ||
o = c; while(++i < fmt.length && "0#?.,E+-%".indexOf(c=fmt.charAt(i)) > -1) o += c; | ||
out[out.length] = {t:'n', v:o}; break; | ||
@@ -716,3 +716,3 @@ case '?': | ||
out[i].t = 't'; break; | ||
case 'n': case '(': case '?': | ||
case 'n': case '?': | ||
jj = i+1; | ||
@@ -737,3 +737,3 @@ while(out[jj] != null && ( | ||
myv = (v<0&&nstr.charCodeAt(0) === 45 ? -v : v); | ||
ostr = write_num('(', nstr, myv); | ||
ostr = write_num('n', nstr, myv); | ||
} else { | ||
@@ -753,3 +753,3 @@ myv = (v<0 && flen > 1 ? -v : v); | ||
for(i=out.length-1; i>= 0;--i) { | ||
if(out[i] == null || 'n?('.indexOf(out[i].t) === -1) continue; | ||
if(out[i] == null || 'n?'.indexOf(out[i].t) === -1) continue; | ||
if(jj>=out[i].v.length-1) { jj -= out[i].v.length; out[i].v = ostr.substr(jj+1, out[i].v.length); } | ||
@@ -766,3 +766,3 @@ else if(jj < 0) out[i].v = ""; | ||
for(i=decpt; i>= 0; --i) { | ||
if(out[i] == null || 'n?('.indexOf(out[i].t) === -1) continue; | ||
if(out[i] == null || 'n?'.indexOf(out[i].t) === -1) continue; | ||
j=out[i].v.indexOf(".")>-1&&i===decpt?out[i].v.indexOf(".")-1:out[i].v.length-1; | ||
@@ -792,3 +792,3 @@ vv = out[i].v.substr(j+1); | ||
} | ||
for(i=0; i<out.length; ++i) if(out[i] != null && 'n(?'.indexOf(out[i].t)>-1) { | ||
for(i=0; i<out.length; ++i) if(out[i] != null && 'n?'.indexOf(out[i].t)>-1) { | ||
myv = (flen >1 && v < 0 && i>0 && out[i-1].v === "-" ? -v:v); | ||
@@ -795,0 +795,0 @@ out[i].v = write_num(out[i].t, out[i].v, myv); |
14
ssf.js
@@ -6,3 +6,3 @@ /* ssf.js (C) 2013-present SheetJS -- http://sheetjs.com */ | ||
var make_ssf = function make_ssf(SSF){ | ||
SSF.version = '0.10.3'; | ||
SSF.version = '0.11.0'; | ||
function _strrev(x) { var o = "", i = x.length-1; while(i>=0) o += x.charAt(i--); return o; } | ||
@@ -649,3 +649,3 @@ function fill(c,l) { var o = ""; while(o.length < l) o+=c; return o; } | ||
case '0': case '#': | ||
o = c; while((++i < fmt.length && "0#?.,E+-%".indexOf(c=fmt.charAt(i)) > -1) || (c=='\\' && fmt.charAt(i+1) == "-" && i < fmt.length - 2 && "0#".indexOf(fmt.charAt(i+2))>-1)) o += c; | ||
o = c; while(++i < fmt.length && "0#?.,E+-%".indexOf(c=fmt.charAt(i)) > -1) o += c; | ||
out[out.length] = {t:'n', v:o}; break; | ||
@@ -706,3 +706,3 @@ case '?': | ||
out[i].t = 't'; break; | ||
case 'n': case '(': case '?': | ||
case 'n': case '?': | ||
jj = i+1; | ||
@@ -727,3 +727,3 @@ while(out[jj] != null && ( | ||
myv = (v<0&&nstr.charCodeAt(0) === 45 ? -v : v); | ||
ostr = write_num('(', nstr, myv); | ||
ostr = write_num('n', nstr, myv); | ||
} else { | ||
@@ -743,3 +743,3 @@ myv = (v<0 && flen > 1 ? -v : v); | ||
for(i=out.length-1; i>= 0;--i) { | ||
if(out[i] == null || 'n?('.indexOf(out[i].t) === -1) continue; | ||
if(out[i] == null || 'n?'.indexOf(out[i].t) === -1) continue; | ||
if(jj>=out[i].v.length-1) { jj -= out[i].v.length; out[i].v = ostr.substr(jj+1, out[i].v.length); } | ||
@@ -756,3 +756,3 @@ else if(jj < 0) out[i].v = ""; | ||
for(i=decpt; i>= 0; --i) { | ||
if(out[i] == null || 'n?('.indexOf(out[i].t) === -1) continue; | ||
if(out[i] == null || 'n?'.indexOf(out[i].t) === -1) continue; | ||
j=out[i].v.indexOf(".")>-1&&i===decpt?out[i].v.indexOf(".")-1:out[i].v.length-1; | ||
@@ -782,3 +782,3 @@ vv = out[i].v.substr(j+1); | ||
} | ||
for(i=0; i<out.length; ++i) if(out[i] != null && 'n(?'.indexOf(out[i].t)>-1) { | ||
for(i=0; i<out.length; ++i) if(out[i] != null && 'n?'.indexOf(out[i].t)>-1) { | ||
myv = (flen >1 && v < 0 && i>0 && out[i-1].v === "-" ? -v:v); | ||
@@ -785,0 +785,0 @@ out[i].v = write_num(out[i].t, out[i].v, myv); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
214727
9
6602
9
1