type-store 0.2.40 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +12 -12
  2. package/type-store.js +13 -3
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "type-store",
3
3
  "description": "type ecosystem",
4
- "version": "0.2.40",
4
+ "version": "0.3.0",
5
5
  "author": "Codenautas <codenautas@googlegroups.com>",
6
6
  "repository": "codenautas/type-store",
7
7
  "license": "MIT",
@@ -11,21 +11,21 @@
11
11
  "postgres-interval4client.js"
12
12
  ],
13
13
  "dependencies": {
14
- "big.js": "~6.1.0",
15
- "best-globals": "~0.10.31",
16
- "js-to-html": "~1.2.0",
17
- "json4all": "~1.1.0",
18
- "like-ar": "~0.3.3"
14
+ "big.js": "^6.2.1",
15
+ "best-globals": "^1.0.4",
16
+ "js-to-html": "^1.3.2",
17
+ "json4all": "^1.1.0",
18
+ "like-ar": "^0.3.6"
19
19
  },
20
20
  "devDependencies": {
21
- "expect.js": "~0.3.1",
22
- "istanbul": "~0.4.5",
23
- "mocha": "~8.3.2",
24
- "postgres-interval": "~3.0.0",
25
- "discrepances": "~0.2.6"
21
+ "expect.js": "^0.3.1",
22
+ "istanbul": "^0.4.5",
23
+ "mocha": "^10.2.0",
24
+ "postgres-interval": "^4.0.0",
25
+ "discrepances": "^0.2.6"
26
26
  },
27
27
  "engines": {
28
- "node": ">= 4"
28
+ "node": ">= 14"
29
29
  },
30
30
  "scripts": {
31
31
  "start": "node example/server.js",
package/type-store.js CHANGED
@@ -134,7 +134,7 @@ TypeBase.prototype.toHtml=function toHtml(typedValue){
134
134
  return html.span(attr, part);
135
135
  },
136
136
  function Parts(parts, className, otherAttrs){
137
- var attrs=otherAttrs?changing(otherAttrs,{class:className}):{class:className};
137
+ var attrs=otherAttrs?changing({class:className},otherAttrs):{class:className};
138
138
  return html.span(attrs, parts);
139
139
  }
140
140
  );
@@ -376,7 +376,7 @@ TypeStore.typeNumber.prototype.toLocalParts=function toLocalParts(typedValue,fPa
376
376
  rta.push(fPart(decimals,"number-decimals"));
377
377
  }
378
378
  });
379
- return fParts(rta,"number");
379
+ return fParts(rta, "number", {"number-sign":typedValue>0?"positive":typedValue<0?"negative":"zero"});
380
380
  };
381
381
  TypeStore.typeNumber.prototype.isValidTypedData=function isValidTypedData(typedData){
382
382
  return typedData==null || typeof typedData === 'number' || typedData instanceof Big;
@@ -582,10 +582,20 @@ TypeStore.type.date.prototype.fromExcelCell=function fromExcelCell(cell){
582
582
  }
583
583
  return this.fromLocalString(cell.v);
584
584
  }catch(err){
585
- console.log('esta fecha no la pude',cell.v)
585
+ err.message+= ' ' + cell.v;
586
586
  throw err;
587
587
  }
588
588
  }
589
+ /*
590
+ Ojo con: https://www.npmjs.com/package/xlsx#utility-functions
591
+
592
+ Epochs: 1900 and 1904 (click to show)
593
+ Excel supports two epochs (January 1 1900 and January 1 1904), see "1900 vs. 1904 Date System" article.
594
+ The workbook's epoch can be determined by examining the workbook's wb.Workbook.WBProps.date1904 property:
595
+
596
+ !!(((wb.Workbook||{}).WBProps||{}).date1904)
597
+
598
+ */
589
599
  return cell.v!=null?bestGlobals.date.ymd(1899,12,31).add({days: cell.v-(cell.v>60?1:0)}):null;
590
600
  };
591
601
  TypeStore.type.date.prototype.isValidTypedData=function isValidTypedData(typedData){