dgeoutils 2.4.35 → 2.4.38

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
@@ -3,8 +3,7 @@
3
3
 
4
4
  [![NPM](https://nodei.co/npm/dgeoutils.png?downloads=true)](https://www.npmjs.com/package/dgeoutils)
5
5
 
6
- [![Dependecy Status](https://david-dm.org/edejin/DGeoUtils.svg)](https://david-dm.org/edejin/DGeoUtils)
7
- [![devDependencies Status](https://david-dm.org/edejin/DGeoUtils/dev-status.svg)](https://david-dm.org/edejin/DGeoUtils?type=dev)
6
+ [![Libraries.io dependency status for latest release](https://img.shields.io/librariesio/release/npm/dgeoutils)](https://libraries.io/npm/dgeoutils)
8
7
 
9
8
  [![npm-publish](https://github.com/edejin/DGeoUtils/actions/workflows/npm-publish.yml/badge.svg)](https://github.com/edejin/DGeoUtils/actions/workflows/npm-publish.yml)
10
9
 
@@ -1004,13 +1004,16 @@ var DPolygon = (function () {
1004
1004
  }, []);
1005
1005
  case 'Feature': {
1006
1006
  var t = DPolygon.parse(a.geometry, format);
1007
+ var props_1 = __assign(__assign({}, a.properties), (a.id ? ({
1008
+ id: a.id
1009
+ }) : ({})));
1007
1010
  if (Array.isArray(t)) {
1008
1011
  t.forEach(function (record) {
1009
- record.properties = __assign(__assign({}, a.properties), { id: a.id });
1012
+ record.properties = __assign({}, props_1);
1010
1013
  });
1011
1014
  }
1012
1015
  else {
1013
- t.properties = __assign(__assign({}, a.properties), { id: a.id });
1016
+ t.properties = __assign({}, props_1);
1014
1017
  }
1015
1018
  return t;
1016
1019
  }
@@ -646,13 +646,16 @@ export class DPolygon {
646
646
  }, []);
647
647
  case 'Feature': {
648
648
  const t = DPolygon.parse(a.geometry, format);
649
+ const props = Object.assign(Object.assign({}, a.properties), (a.id ? ({
650
+ id: a.id
651
+ }) : ({})));
649
652
  if (Array.isArray(t)) {
650
653
  t.forEach((record) => {
651
- record.properties = Object.assign(Object.assign({}, a.properties), { id: a.id });
654
+ record.properties = Object.assign({}, props);
652
655
  });
653
656
  }
654
657
  else {
655
- t.properties = Object.assign(Object.assign({}, a.properties), { id: a.id });
658
+ t.properties = Object.assign({}, props);
656
659
  }
657
660
  return t;
658
661
  }
@@ -1001,13 +1001,16 @@ var DPolygon = (function () {
1001
1001
  }, []);
1002
1002
  case 'Feature': {
1003
1003
  var t = DPolygon.parse(a.geometry, format);
1004
+ var props_1 = __assign(__assign({}, a.properties), (a.id ? ({
1005
+ id: a.id
1006
+ }) : ({})));
1004
1007
  if (Array.isArray(t)) {
1005
1008
  t.forEach(function (record) {
1006
- record.properties = __assign(__assign({}, a.properties), { id: a.id });
1009
+ record.properties = __assign({}, props_1);
1007
1010
  });
1008
1011
  }
1009
1012
  else {
1010
- t.properties = __assign(__assign({}, a.properties), { id: a.id });
1013
+ t.properties = __assign({}, props_1);
1011
1014
  }
1012
1015
  return t;
1013
1016
  }