Comparing version 0.11.0 to 0.12.0
@@ -20,2 +20,3 @@ "use_strict"; | ||
const scale = require("./scale.js"); | ||
const validate = require("./validate.js"); | ||
@@ -39,3 +40,4 @@ const bboxfns = { | ||
reproject, | ||
scale | ||
scale, | ||
validate | ||
}; | ||
@@ -42,0 +44,0 @@ |
{ | ||
"name": "bbox-fns", | ||
"version": "0.11.0", | ||
"version": "0.12.0", | ||
"description": "Light-weight JavaScript Bounding Box Utility Functions", | ||
@@ -24,3 +24,4 @@ "main": "index.js", | ||
"precise/divide.js", | ||
"precise/reproject.js" | ||
"precise/reproject.js", | ||
"validate.js" | ||
], | ||
@@ -48,4 +49,4 @@ "scripts": { | ||
"dependencies": { | ||
"preciso": "^0.11.0" | ||
"preciso": "^0.12.0" | ||
} | ||
} |
@@ -24,2 +24,3 @@ # bbox-fns: work in progress | ||
- [reproject](#reproject) | ||
- [validate](#validate) | ||
@@ -222,2 +223,18 @@ ### bboxArea | ||
### validate | ||
```js | ||
import validate from "bbox-fns/validate.js"; | ||
validate([-180, 0, 180, 45]) | ||
true | ||
// invalid length | ||
validate([-180, 0, 0, 180, 45, 0]) | ||
false | ||
// xmin greater than xmax | ||
validate([-45, 10, -90, 20]) | ||
false | ||
``` | ||
### projection support | ||
@@ -224,0 +241,0 @@ If you are looking for a library with greater projection support and a class-based approach, try [geo-extent](https://github.com/danieljdufour/geo-extent)! |
28854
22
461
260
2463
+ Addedpreciso@0.12.2(transitive)
- Removedpreciso@0.11.1(transitive)
Updatedpreciso@^0.12.0