@turf/flip 6.4.0 → 7.0.0-alpha.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.
package/README.md CHANGED
@@ -6,13 +6,14 @@
6
6
 
7
7
  Takes input features and flips all of their coordinates from `[x, y]` to `[y, x]`.
8
8
 
9
- **Parameters**
9
+ ### Parameters
10
10
 
11
- - `geojson` **[GeoJSON][1]** input features
12
- - `options` **[Object][2]** Optional parameters (optional, default `{}`)
13
- - `options.mutate` **[boolean][3]** allows GeoJSON input to be mutated (significant performance increase if true) (optional, default `false`)
11
+ * `geojson` **[GeoJSON][1]** input features
12
+ * `options` **[Object][2]** Optional parameters (optional, default `{}`)
14
13
 
15
- **Examples**
14
+ * `options.mutate` **[boolean][3]** allows GeoJSON input to be mutated (significant performance increase if true) (optional, default `false`)
15
+
16
+ ### Examples
16
17
 
17
18
  ```javascript
18
19
  var serbia = turf.point([20.566406, 43.421008]);
package/dist/es/index.js CHANGED
File without changes
package/dist/js/index.js CHANGED
@@ -1,10 +1,12 @@
1
1
  'use strict';
2
2
 
3
- function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
4
-
5
3
  var meta = require('@turf/meta');
6
4
  var helpers = require('@turf/helpers');
7
- var clone = _interopDefault(require('@turf/clone'));
5
+ var clone = require('@turf/clone');
6
+
7
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
+
9
+ var clone__default = /*#__PURE__*/_interopDefaultLegacy(clone);
8
10
 
9
11
  /**
10
12
  * Takes input features and flips all of their coordinates from `[x, y]` to `[y, x]`.
@@ -32,7 +34,7 @@ function flip(geojson, options) {
32
34
  // ensure that we don't modify features in-place and changes to the
33
35
  // output do not change the previous feature, including changes to nested
34
36
  // properties.
35
- if (mutate === false || mutate === undefined) geojson = clone(geojson);
37
+ if (mutate === false || mutate === undefined) geojson = clone__default['default'](geojson);
36
38
 
37
39
  meta.coordEach(geojson, function (coord) {
38
40
  var x = coord[0];
@@ -44,3 +46,4 @@ function flip(geojson, options) {
44
46
  }
45
47
 
46
48
  module.exports = flip;
49
+ module.exports.default = flip;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@turf/flip",
3
- "version": "6.4.0",
3
+ "version": "7.0.0-alpha.0",
4
4
  "description": "turf flip module",
5
5
  "author": "Turf Authors",
6
6
  "license": "MIT",
@@ -12,6 +12,7 @@
12
12
  "type": "git",
13
13
  "url": "git://github.com/Turfjs/turf.git"
14
14
  },
15
+ "funding": "https://opencollective.com/turf",
15
16
  "publishConfig": {
16
17
  "access": "public"
17
18
  },
@@ -42,7 +43,7 @@
42
43
  "docs": "node ../../scripts/generate-readmes",
43
44
  "test": "npm-run-all test:*",
44
45
  "test:tape": "node -r esm test.js",
45
- "test:types": "tsc --esModuleInterop --noEmit types.ts"
46
+ "test:types": "tsc --esModuleInterop --noEmit --strict types.ts"
46
47
  },
47
48
  "devDependencies": {
48
49
  "benchmark": "*",
@@ -53,9 +54,9 @@
53
54
  "write-json-file": "*"
54
55
  },
55
56
  "dependencies": {
56
- "@turf/clone": "^6.4.0",
57
- "@turf/helpers": "^6.4.0",
58
- "@turf/meta": "^6.4.0"
57
+ "@turf/clone": "^7.0.0-alpha.0",
58
+ "@turf/helpers": "^7.0.0-alpha.0",
59
+ "@turf/meta": "^7.0.0-alpha.0"
59
60
  },
60
- "gitHead": "1e62773cfc88c627cca8effcb5c14cfb65a905ac"
61
+ "gitHead": "0edc4c491b999e5ace770a61e1cf549f7c004189"
61
62
  }