@nxtedition/deepstream.io-client-js 23.2.3 → 23.2.4

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.
@@ -326,4 +326,20 @@ describe('plain JSON', () => {
326
326
  expect(res).toBe(jsonPath.EMPTY)
327
327
  expect(res).toEqual({})
328
328
  })
329
+
330
+ it('stringify date', () => {
331
+ const y = {
332
+ time: {},
333
+ }
334
+ const date = new Date()
335
+ const res = jsonPath.set(
336
+ y,
337
+ null,
338
+ {
339
+ date,
340
+ },
341
+ false
342
+ )
343
+ expect(res.date).toEqual(date.toISOString())
344
+ })
329
345
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/deepstream.io-client-js",
3
- "version": "23.2.3",
3
+ "version": "23.2.4",
4
4
  "description": "the javascript client for deepstream.io",
5
5
  "homepage": "http://deepstream.io",
6
6
  "bugs": {
@@ -87,7 +87,7 @@ function jsonClone(o) {
87
87
 
88
88
  if (Array.isArray(o) && o.length === 0) {
89
89
  return EMPTY_ARR
90
- } else if (typeof o === 'object' && Object.keys(o).length === 0) {
90
+ } else if (utils.isPlainObject(o) && Object.keys(o).length === 0) {
91
91
  return EMPTY_OBJ
92
92
  }
93
93