Comparing version 0.0.2 to 0.0.3
@@ -0,1 +1,7 @@ | ||
#### 0.0.3 (2018-03-24) | ||
##### Refactors | ||
* split out validators and make functions static ([9e7cc083](https://github.com/MichaelSolati/geokit/commit/9e7cc083f21d6b153c393fe1ea71cc249e1c2681)) | ||
#### 0.0.2 (2018-03-08) | ||
@@ -2,0 +8,0 @@ |
{ | ||
"name": "geokit", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "An assortment of geolocation related tools, all packaged in one easy to use kit.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -1,2 +0,2 @@ | ||
import { geokit } from '../src/geokit'; | ||
import { Geokit } from '../src/geokit'; | ||
import { LatLngLiteral } from '../src/interfaces'; | ||
@@ -10,24 +10,24 @@ | ||
it('Distance between New Haven and Sydney should be 16082.811206563834 km', () => { | ||
expect(geokit.distance({ lat: 41.3083, lng: -72.9279 }, { lat: -33.8688, lng: 151.2093 })).to.equal(16082.811206563834); | ||
expect(Geokit.distance({ lat: 41.3083, lng: -72.9279 }, { lat: -33.8688, lng: 151.2093 })).to.equal(16082.811206563834); | ||
}); | ||
it('Distance between New York and San Francisco should be 2568.4458439997047 miles', () => { | ||
expect(geokit.distance({ lat: 40.7128, lng: -74.0060 }, { lat: 37.7749, lng: -122.4194 }, 'miles')).to.equal(2568.4458439997047); | ||
expect(Geokit.distance({ lat: 40.7128, lng: -74.0060 }, { lat: 37.7749, lng: -122.4194 }, 'miles')).to.equal(2568.4458439997047); | ||
}); | ||
it('Distance between 0, 0 and 91, 0 with should throw an Error', () => { | ||
expect(() => geokit.distance({ lat: 0, lng: 0 }, { lat: 91, lng: 0 })).to.throw(null, 'End coordinates: Your latitude is greater than 90°'); | ||
expect(() => Geokit.distance({ lat: 0, lng: 0 }, { lat: 91, lng: 0 })).to.throw(null, 'End coordinates: Your latitude is greater than 90°'); | ||
}); | ||
it('Hash coordinates 41.3083, -72.9279 should yield \'drk4urzw2c\'', () => { | ||
expect(geokit.hash({ lat: 41.3083, lng: -72.9279 })).to.equal('drk4urzw2c'); | ||
expect(Geokit.hash({ lat: 41.3083, lng: -72.9279 })).to.equal('drk4urzw2c'); | ||
}); | ||
it('Hash coordinates -33.8688, 151.2093 with a precision of 9 should yield \'r3gx2f77b\'', () => { | ||
expect(geokit.hash({ lat: -33.8688, lng: 151.2093 }, 9)).to.equal('r3gx2f77b'); | ||
expect(Geokit.hash({ lat: -33.8688, lng: 151.2093 }, 9)).to.equal('r3gx2f77b'); | ||
}); | ||
it('Hash coordinates 91, 0 with should throw an Error', () => { | ||
expect(() => geokit.hash({ lat: 91, lng: 0 })).to.throw(null, 'Your latitude is greater than 90°'); | ||
expect(() => Geokit.hash({ lat: 91, lng: 0 })).to.throw(null, 'Your latitude is greater than 90°'); | ||
}); | ||
}); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
14133
17
237
0
1