xml-toolkit 1.0.1 → 1.0.2

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.
package/README.md CHANGED
@@ -57,6 +57,8 @@ let xmlResult = ''; for await (const node of new XMLReader ().process (xmlSource
57
57
  * [Serializing an Object According to an XML Schema](https://github.com/do-/node-xml-toolkit/wiki/Use-Case:-Serializing-an-Object-According-to-an-XML-Schema)
58
58
 
59
59
  ```js
60
+ const {XMLSchemata} = require ('xml-toolkit')
61
+
60
62
  const data = {ExportDebtRequestsResponse: {
61
63
  "request-data": {
62
64
  // ...
@@ -178,7 +178,9 @@ const XMLMarshaller = class {
178
178
  if (v.length === 10) return v
179
179
  case 'number':
180
180
  case 'bigint':
181
- v = new Date (v)
181
+ const d = new Date (v)
182
+ if (isNaN (d)) carp ()
183
+ v = d
182
184
  }
183
185
  if (v instanceof Date) {
184
186
  return v.toJSON ().slice (0, 10)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xml-toolkit",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Collection of classes for dealing with XML",
5
5
  "main": "index.js",
6
6
  "scripts": {