Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated documentation.js to resolve critical parse-url vulnerability #2664

Merged
merged 1 commit into from
Jul 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"d3-queue": "*",
"decamelize": "^6.0.0",
"dependency-tree": "^8.1.2",
"documentation": "^13.2.5",
"documentation": "^14.0.3",
"es-check": "^7.1.1",
"eslint": "^8.53.0",
"eslint-config-prettier": "^9.0.0",
Expand Down
20 changes: 8 additions & 12 deletions packages/turf-along/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ Takes a [LineString][1] and returns a [Point][2] at a specified distance along t

### Parameters

* `line` **[Feature][3]<[LineString][4]>** input line
* `distance` **[number][5]** distance along the line
* `options` **[Object][6]?** Optional parameters
* `line` **[Feature][3]<[LineString][1]>** input line
* `distance` **[number][4]** distance along the line
* `options` **[Object][5]?** Optional parameters

* `options.units` **[string][7]** can be degrees, radians, miles, or kilometers (optional, default `"kilometers"`)
* `options.units` **[string][6]** can be degrees, radians, miles, or kilometers (optional, default `"kilometers"`)

### Examples

Expand All @@ -26,23 +26,19 @@ var along = turf.along(line, 200, options);
var addToMap = [along, line]
```

Returns **[Feature][3]<[Point][8]>** Point `distance` `units` along the line
Returns **[Feature][3]<[Point][2]>** Point `distance` `units` along the line

[1]: https://tools.ietf.org/html/rfc7946#section-3.1.4

[2]: https://tools.ietf.org/html/rfc7946#section-3.1.2

[3]: https://tools.ietf.org/html/rfc7946#section-3.2

[4]: https://tools.ietf.org/html/rfc7946#section-3.1.4
[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number

[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object

[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object

[7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String

[8]: https://tools.ietf.org/html/rfc7946#section-3.1.2
[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String

<!-- This file is automatically generated. Please don't edit it directly. If you find an error, edit the source file of the module in question (likely index.js or index.ts), and re-run "yarn docs" from the root of the turf project. -->

Expand Down
18 changes: 8 additions & 10 deletions packages/turf-bbox-clip/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ May result in degenerate edges when clipping Polygons.

### Parameters

* `feature` **[Feature][3]<([LineString][4] | [MultiLineString][5] | [Polygon][6] | [MultiPolygon][7])>** feature to clip to the bbox
* `bbox` **[BBox][8]** extent in \[minX, minY, maxX, maxY] order
* `feature` **[Feature][1]<([LineString][3] | [MultiLineString][4] | [Polygon][5] | [MultiPolygon][6])>** feature to clip to the bbox
* `bbox` **[BBox][7]** extent in \[minX, minY, maxX, maxY] order

### Examples

Expand All @@ -25,23 +25,21 @@ var clipped = turf.bboxClip(poly, bbox);
var addToMap = [bbox, poly, clipped]
```

Returns **[Feature][3]<([LineString][4] | [MultiLineString][5] | [Polygon][6] | [MultiPolygon][7])>** clipped Feature
Returns **[Feature][1]<([LineString][3] | [MultiLineString][4] | [Polygon][5] | [MultiPolygon][6])>** clipped Feature

[1]: https://tools.ietf.org/html/rfc7946#section-3.2

[2]: https://github.com/mapbox/lineclip

[3]: https://tools.ietf.org/html/rfc7946#section-3.2
[3]: https://tools.ietf.org/html/rfc7946#section-3.1.4

[4]: https://tools.ietf.org/html/rfc7946#section-3.1.4
[4]: https://tools.ietf.org/html/rfc7946#section-3.1.5

[5]: https://tools.ietf.org/html/rfc7946#section-3.1.5
[5]: https://tools.ietf.org/html/rfc7946#section-3.1.6

[6]: https://tools.ietf.org/html/rfc7946#section-3.1.6
[6]: https://tools.ietf.org/html/rfc7946#section-3.1.7

[7]: https://tools.ietf.org/html/rfc7946#section-3.1.7

[8]: https://tools.ietf.org/html/rfc7946#section-5
[7]: https://tools.ietf.org/html/rfc7946#section-5

<!-- This file is automatically generated. Please don't edit it directly. If you find an error, edit the source file of the module in question (likely index.js or index.ts), and re-run "yarn docs" from the root of the turf project. -->

Expand Down
4 changes: 1 addition & 3 deletions packages/turf-bbox-polygon/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ var poly = turf.bboxPolygon(bbox);
var addToMap = [poly]
```

Returns **[Feature][6]<[Polygon][7]>** a Polygon representation of the bounding box
Returns **[Feature][6]<[Polygon][1]>** a Polygon representation of the bounding box

[1]: https://tools.ietf.org/html/rfc7946#section-3.1.6

Expand All @@ -39,8 +39,6 @@ Returns **[Feature][6]<[Polygon][7]>** a Polygon representation of the bounding

[6]: https://tools.ietf.org/html/rfc7946#section-3.2

[7]: https://tools.ietf.org/html/rfc7946#section-3.1.6

<!-- This file is automatically generated. Please don't edit it directly. If you find an error, edit the source file of the module in question (likely index.js or index.ts), and re-run "yarn docs" from the root of the turf project. -->

---
Expand Down
18 changes: 8 additions & 10 deletions packages/turf-bezier-spline/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ The bezier spline implementation is by [Leszek Rybicki][3].

### Parameters

* `line` **[Feature][4]<[LineString][5]>** input LineString
* `options` **[Object][6]** Optional parameters (optional, default `{}`)
* `line` **[Feature][4]<[LineString][1]>** input LineString
* `options` **[Object][5]** Optional parameters (optional, default `{}`)

* `options.properties` **[Object][6]** Translate properties to output (optional, default `{}`)
* `options.resolution` **[number][7]** time in milliseconds between points (optional, default `10000`)
* `options.sharpness` **[number][7]** a measure of how curvy the path should be between splines (optional, default `0.85`)
* `options.properties` **[Object][5]** Translate properties to output (optional, default `{}`)
* `options.resolution` **[number][6]** time in milliseconds between points (optional, default `10000`)
* `options.sharpness` **[number][6]** a measure of how curvy the path should be between splines (optional, default `0.85`)

### Examples

Expand All @@ -38,7 +38,7 @@ var addToMap = [line, curved]
curved.properties = { stroke: '#0F0' };
```

Returns **[Feature][4]<[LineString][5]>** curved line
Returns **[Feature][4]<[LineString][1]>** curved line

[1]: https://tools.ietf.org/html/rfc7946#section-3.1.4

Expand All @@ -48,11 +48,9 @@ Returns **[Feature][4]<[LineString][5]>** curved line

[4]: https://tools.ietf.org/html/rfc7946#section-3.2

[5]: https://tools.ietf.org/html/rfc7946#section-3.1.4
[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object

[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object

[7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number

<!-- This file is automatically generated. Please don't edit it directly. If you find an error, edit the source file of the module in question (likely index.js or index.ts), and re-run "yarn docs" from the root of the turf project. -->

Expand Down
2 changes: 1 addition & 1 deletion packages/turf-boolean-equal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
## booleanEqual

Determine whether two geometries of the same type have identical X,Y coordinate values.
See [http://edndoc.esri.com/arcsde/9.0/general_topics/understand_spatial_relations.htm][1]
See [http://edndoc.esri.com/arcsde/9.0/general\_topics/understand\_spatial\_relations.htm][1]

### Parameters

Expand Down
16 changes: 6 additions & 10 deletions packages/turf-boolean-point-in-polygon/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ resides inside the polygon. The polygon can be convex or concave. The function a
### Parameters

* `point` **[Coord][4]** input point
* `polygon` **[Feature][5]<([Polygon][6] | [MultiPolygon][7])>** input polygon or multipolygon
* `options` **[Object][8]** Optional parameters (optional, default `{}`)
* `polygon` **[Feature][5]<([Polygon][2] | [MultiPolygon][3])>** input polygon or multipolygon
* `options` **[Object][6]** Optional parameters (optional, default `{}`)

* `options.ignoreBoundary` **[boolean][9]** True if polygon boundary should be ignored when determining if
* `options.ignoreBoundary` **[boolean][7]** True if polygon boundary should be ignored when determining if
the point is inside the polygon otherwise false. (optional, default `false`)

### Examples
Expand All @@ -32,7 +32,7 @@ turf.booleanPointInPolygon(pt, poly);
//= true
```

Returns **[boolean][9]** `true` if the Point is inside the Polygon; `false` if the Point is not inside the Polygon
Returns **[boolean][7]** `true` if the Point is inside the Polygon; `false` if the Point is not inside the Polygon

[1]: https://tools.ietf.org/html/rfc7946#section-3.1.2

Expand All @@ -44,13 +44,9 @@ Returns **[boolean][9]** `true` if the Point is inside the Polygon; `false` if t

[5]: https://tools.ietf.org/html/rfc7946#section-3.2

[6]: https://tools.ietf.org/html/rfc7946#section-3.1.6
[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object

[7]: https://tools.ietf.org/html/rfc7946#section-3.1.7

[8]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object

[9]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
[7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean

<!-- This file is automatically generated. Please don't edit it directly. If you find an error, edit the source file of the module in question (likely index.js or index.ts), and re-run "yarn docs" from the root of the turf project. -->

Expand Down
6 changes: 2 additions & 4 deletions packages/turf-center-mean/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ mean.properties['marker-size'] = 'large';
mean.properties['marker-color'] = '#000';
```

Returns **[Feature][6]<[Point][7]>** a Point feature at the mean center point of all input features
Returns **[Feature][1]<[Point][6]>** a Point feature at the mean center point of all input features

[1]: https://tools.ietf.org/html/rfc7946#section-3.2

Expand All @@ -46,9 +46,7 @@ Returns **[Feature][6]<[Point][7]>** a Point feature at the mean center point of

[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String

[6]: https://tools.ietf.org/html/rfc7946#section-3.2

[7]: https://tools.ietf.org/html/rfc7946#section-3.1.2
[6]: https://tools.ietf.org/html/rfc7946#section-3.1.2

<!-- This file is automatically generated. Please don't edit it directly. If you find an error, edit the source file of the module in question (likely index.js or index.ts), and re-run "yarn docs" from the root of the turf project. -->

Expand Down
24 changes: 11 additions & 13 deletions packages/turf-center-median/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ Press, 2009, 150–151.

### Parameters

* `features` **[FeatureCollection][3]\<any>** Any GeoJSON Feature Collection
* `options` **[Object][4]** Optional parameters (optional, default `{}`)
* `features` **[FeatureCollection][1]\<any>** Any GeoJSON Feature Collection
* `options` **[Object][3]** Optional parameters (optional, default `{}`)

* `options.weight` **[string][5]?** the property name used to weight the center
* `options.tolerance` **[number][6]** the difference in distance between candidate medians at which point the algorighim stops iterating. (optional, default `0.001`)
* `options.counter` **[number][6]** how many attempts to find the median, should the tolerance be insufficient. (optional, default `10`)
* `options.weight` **[string][4]?** the property name used to weight the center
* `options.tolerance` **[number][5]** the difference in distance between candidate medians at which point the algorighim stops iterating. (optional, default `0.001`)
* `options.counter` **[number][5]** how many attempts to find the median, should the tolerance be insufficient. (optional, default `10`)

### Examples

Expand All @@ -60,23 +60,21 @@ var medianCenter = turf.centerMedian(points);
var addToMap = [points, medianCenter]
```

Returns **[Feature][7]<[Point][8]>** The median center of the collection
Returns **[Feature][6]<[Point][7]>** The median center of the collection

[1]: https://tools.ietf.org/html/rfc7946#section-3.3

[2]: https://doi.org/10.1111/j.1467-9787.1962.tb00902.x}

[3]: https://tools.ietf.org/html/rfc7946#section-3.3
[3]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object

[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String

[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number

[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
[6]: https://tools.ietf.org/html/rfc7946#section-3.2

[7]: https://tools.ietf.org/html/rfc7946#section-3.2

[8]: https://tools.ietf.org/html/rfc7946#section-3.1.2
[7]: https://tools.ietf.org/html/rfc7946#section-3.1.2

<!-- This file is automatically generated. Please don't edit it directly. If you find an error, edit the source file of the module in question (likely index.js or index.ts), and re-run "yarn docs" from the root of the turf project. -->

Expand Down
6 changes: 2 additions & 4 deletions packages/turf-center-of-mass/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var center = turf.centerOfMass(polygon);
var addToMap = [polygon, center]
```

Returns **[Feature][7]<[Point][8]>** the center of mass
Returns **[Feature][1]<[Point][7]>** the center of mass

[1]: https://tools.ietf.org/html/rfc7946#section-3.2

Expand All @@ -38,9 +38,7 @@ Returns **[Feature][7]<[Point][8]>** the center of mass

[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object

[7]: https://tools.ietf.org/html/rfc7946#section-3.2

[8]: https://tools.ietf.org/html/rfc7946#section-3.1.2
[7]: https://tools.ietf.org/html/rfc7946#section-3.1.2

<!-- This file is automatically generated. Please don't edit it directly. If you find an error, edit the source file of the module in question (likely index.js or index.ts), and re-run "yarn docs" from the root of the turf project. -->

Expand Down
6 changes: 2 additions & 4 deletions packages/turf-center/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ center.properties['marker-size'] = 'large';
center.properties['marker-color'] = '#000';
```

Returns **[Feature][5]<[Point][6]>** a Point feature at the absolute center point of all input features
Returns **[Feature][1]<[Point][5]>** a Point feature at the absolute center point of all input features

[1]: https://tools.ietf.org/html/rfc7946#section-3.2

Expand All @@ -42,9 +42,7 @@ Returns **[Feature][5]<[Point][6]>** a Point feature at the absolute center poin

[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object

[5]: https://tools.ietf.org/html/rfc7946#section-3.2

[6]: https://tools.ietf.org/html/rfc7946#section-3.1.2
[5]: https://tools.ietf.org/html/rfc7946#section-3.1.2

<!-- This file is automatically generated. Please don't edit it directly. If you find an error, edit the source file of the module in question (likely index.js or index.ts), and re-run "yarn docs" from the root of the turf project. -->

Expand Down
6 changes: 2 additions & 4 deletions packages/turf-centroid/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,15 @@ var centroid = turf.centroid(polygon);
var addToMap = [polygon, centroid]
```

Returns **[Feature][4]<[Point][5]>** the centroid of the input object
Returns **[Feature][3]<[Point][4]>** the centroid of the input object

[1]: https://tools.ietf.org/html/rfc7946#section-3

[2]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object

[3]: https://tools.ietf.org/html/rfc7946#section-3.2

[4]: https://tools.ietf.org/html/rfc7946#section-3.2

[5]: https://tools.ietf.org/html/rfc7946#section-3.1.2
[4]: https://tools.ietf.org/html/rfc7946#section-3.1.2

<!-- This file is automatically generated. Please don't edit it directly. If you find an error, edit the source file of the module in question (likely index.js or index.ts), and re-run "yarn docs" from the root of the turf project. -->

Expand Down
26 changes: 12 additions & 14 deletions packages/turf-circle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ Takes a [Point][1] and calculates the circle polygon given a radius in degrees,

### Parameters

* `center` **([Feature][2]<[Point][3]> | [Array][4]<[number][5]>)** center point
* `radius` **[number][5]** radius of the circle
* `options` **[Object][6]** Optional parameters (optional, default `{}`)
* `center` **([Feature][2]<[Point][1]> | [Array][3]<[number][4]>)** center point
* `radius` **[number][4]** radius of the circle
* `options` **[Object][5]** Optional parameters (optional, default `{}`)

* `options.steps` **[number][5]** number of steps (optional, default `64`)
* `options.units` **[string][7]** miles, kilometers, degrees, or radians (optional, default `'kilometers'`)
* `options.properties` **[Object][6]** properties (optional, default `{}`)
* `options.steps` **[number][4]** number of steps (optional, default `64`)
* `options.units` **[string][6]** miles, kilometers, degrees, or radians (optional, default `'kilometers'`)
* `options.properties` **[Object][5]** properties (optional, default `{}`)

### Examples

Expand All @@ -28,23 +28,21 @@ var circle = turf.circle(center, radius, options);
var addToMap = [turf.point(center), circle]
```

Returns **[Feature][2]<[Polygon][8]>** circle polygon
Returns **[Feature][2]<[Polygon][7]>** circle polygon

[1]: https://tools.ietf.org/html/rfc7946#section-3.1.2

[2]: https://tools.ietf.org/html/rfc7946#section-3.2

[3]: https://tools.ietf.org/html/rfc7946#section-3.1.2
[3]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array

[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array
[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number

[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object

[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String

[7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String

[8]: https://tools.ietf.org/html/rfc7946#section-3.1.6
[7]: https://tools.ietf.org/html/rfc7946#section-3.1.6

<!-- This file is automatically generated. Please don't edit it directly. If you find an error, edit the source file of the module in question (likely index.js or index.ts), and re-run "yarn docs" from the root of the turf project. -->

Expand Down
Loading
Loading