Comparing version 0.18.0 to 0.19.0
@@ -24,2 +24,3 @@ "use_strict"; | ||
const shift = require("./shift.js"); | ||
const sort = require("./sort.js"); | ||
const split = require("./split.js"); | ||
@@ -56,2 +57,3 @@ const validate = require("./validate.js"); | ||
preciseValidate, | ||
sort, | ||
union, | ||
@@ -58,0 +60,0 @@ unwrap |
{ | ||
"name": "bbox-fns", | ||
"version": "0.18.0", | ||
"version": "0.19.0", | ||
"description": "Light-weight JavaScript Bounding Box Utility Functions", | ||
@@ -32,2 +32,3 @@ "main": "./index.js", | ||
"shift.js", | ||
"sort.js", | ||
"split.js", | ||
@@ -34,0 +35,0 @@ "union.js", |
@@ -29,2 +29,3 @@ # bbox-fns: work in progress | ||
- [shift](#shift) | ||
- [sort](#sort) | ||
- [split](#split) | ||
@@ -331,2 +332,14 @@ - [union](#union) | ||
### sort | ||
```js | ||
import sort from "bbox-fns/sort.js"; | ||
const bboxes = [ | ||
[175, -85, 180, 90], | ||
[-180, -85, -175, 90] | ||
]; | ||
sort(bboxes) | ||
[[-180,-85,-175,90],[175,-85,180,90]] | ||
``` | ||
### union | ||
@@ -333,0 +346,0 @@ Combine all bounding boxes that intersect. |
"use_strict"; | ||
const shift = require("./shift.js"); | ||
const sort = require("./sort.js"); | ||
const split = require("./split.js"); | ||
@@ -42,2 +43,4 @@ const union = require("./union.js"); | ||
bboxes = sort(bboxes); | ||
return bboxes; | ||
@@ -44,0 +47,0 @@ } |
43911
33
831
415