Comparing version 0.1.3 to 0.1.4
@@ -0,1 +1,25 @@ | ||
#### 0.1.4 (2019-06-17) | ||
##### Build System / Dependencies | ||
* **deps-dev:** | ||
* bump firebase-tools from 5.0.1 to 6.11.0 ([c773ba86](https://github.com/MichaelSolati/geokit/commit/c773ba86d91ba53ac06a6b95f5a999b32cba2be7)) | ||
* bump firebase-tools from 5.0.1 to 6.11.0 ([2e1fbd21](https://github.com/MichaelSolati/geokit/commit/2e1fbd211e519102f1a94dbd477d1daf2935fb69)) | ||
* bump rollup-plugin-commonjs from 9.2.0 to 9.3.4 ([f157d89b](https://github.com/MichaelSolati/geokit/commit/f157d89b0572a2321b87fbbe5376b1aa2c94d3a2)) | ||
* bump @types/mocha from 5.2.5 to 5.2.7 ([cf81bb70](https://github.com/MichaelSolati/geokit/commit/cf81bb70c483361eaf2cc1d3f374a65b034aeb39)) | ||
* bump rollup-plugin-uglify from 6.0.0 to 6.0.2 ([a94fcaf5](https://github.com/MichaelSolati/geokit/commit/a94fcaf5917f877e4fa8a0439afe6897900500b3)) | ||
* bump rollup-plugin-commonjs from 9.2.0 to 9.3.4 ([7d865520](https://github.com/MichaelSolati/geokit/commit/7d8655201af9211c2d3460ae3130ec2cda7c40e9)) | ||
* bump rollup-plugin-uglify from 6.0.0 to 6.0.2 ([80a7392b](https://github.com/MichaelSolati/geokit/commit/80a7392b4c8768bc93cd4f5bc87891bc68010b04)) | ||
* bump @types/mocha from 5.2.5 to 5.2.7 ([a35476bc](https://github.com/MichaelSolati/geokit/commit/a35476bc3e0661c75cb821ba6b90c22085c08c53)) | ||
* bump mocha from 5.2.0 to 6.1.4 ([33ad2fea](https://github.com/MichaelSolati/geokit/commit/33ad2fea2f1d29de927ac65ec376ec0b7c0829b9)) | ||
* bump mocha from 5.2.0 to 6.1.4 ([25321c20](https://github.com/MichaelSolati/geokit/commit/25321c2067ef3c3659c25daaa2e52c81e754ba14)) | ||
* **deps:** | ||
* [security] bump axios from 0.18.0 to 0.18.1 ([c52e02ef](https://github.com/MichaelSolati/geokit/commit/c52e02efe0af3548093758a4a1633ad999504395)) | ||
* [security] bump axios from 0.18.0 to 0.18.1 ([0034907e](https://github.com/MichaelSolati/geokit/commit/0034907ee57fb61fcd37b89dde623bcd66a92494)) | ||
* **rollup:** call copy only once during rollup build ([4b9db1a6](https://github.com/MichaelSolati/geokit/commit/4b9db1a60d0c99b4bb6ddf19096ecbabfe57e5b4)) | ||
##### Chores | ||
* update dependencies ([892c678e](https://github.com/MichaelSolati/geokit/commit/892c678e2fe156693167fee79d98b3ef3ec069d2)) | ||
#### 0.1.3 (2018-08-11) | ||
@@ -2,0 +26,0 @@ |
@@ -1,2 +0,2 @@ | ||
import { LatLngLiteral } from './interfaces'; | ||
import { LatLngLiteral } from './definitions'; | ||
/** | ||
@@ -3,0 +3,0 @@ * A class for the Geokit. |
@@ -1,1 +0,1 @@ | ||
!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r(t.window=t.window||{})}(this,function(t){"use strict";function l(t){return t*Math.PI/180}function c(t){var r=[];if(90<t.lat&&r.push("Your latitude is greater than 90°"),t.lat<-90&&r.push("Your latitude is less than -90°"),180<t.lng&&r.push("Your longitude is greater than 180°"),t.lng<-180&&r.push("Your longitude is less than -180°"),0!==r.length)return new Error(r.join(" "))}var r=function(){function t(){}return t.distance=function(t,r,n){void 0===n&&(n="km");var e=c(t);if(e instanceof Error)throw new Error("Start coordinates: "+e.message);var o=c(r);if(o instanceof Error)throw new Error("End coordinates: "+o.message);var a="miles"===n.toLowerCase()?3963:6371,i=l(r.lat-t.lat),s=l(r.lng-t.lng),u=l(t.lat),f=l(r.lat),h=Math.sin(i/2)*Math.sin(i/2)+Math.sin(s/2)*Math.sin(s/2)*Math.cos(u)*Math.cos(f);return a*(2*Math.atan2(Math.sqrt(h),Math.sqrt(1-h)))},t.hash=function(t,r){void 0===r&&(r=10);var n=c(t);if(n instanceof Error)throw n;for(var e,o="",a=[-90,90],i=[-180,180];o.length<r;){for(var s=0,u=0;u<5;u++){var f=(5*o.length+u)%2==0,h=f?t.lng:t.lat,l=f?i:a,d=(l[0]+l[1])/2;s=(s<<1)+(h<((e=l)[0]+e[1])/2?0:1),d<h?l[0]=d:l[1]=d}o+="0123456789bcdefghjkmnpqrstuvwxyz".charAt(s)}return o},t.decodeHash=function(t){for(var r,n=!0,e=[-90,90],o=[-180,180],a=t.split("");a.length;)for(var i=(r=a.shift(),"0123456789bcdefghjkmnpqrstuvwxyz".indexOf(r.toLowerCase())),s=0;s<5;s++){var u=[16,8,4,2,1][s],f=n?o:e,h=(f[0]+f[1])/2;f[i&u?0:1]=h,n=!n}return{lat:(e[0]+e[1])/2,lng:(o[0]+o[1])/2}},t}();t.Geokit=r,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((t=t||self).window=t.window||{})}(this,function(t){"use strict";function l(t){return t*Math.PI/180}function c(t){var r=[];if(90<t.lat&&r.push("Your latitude is greater than 90°"),t.lat<-90&&r.push("Your latitude is less than -90°"),180<t.lng&&r.push("Your longitude is greater than 180°"),t.lng<-180&&r.push("Your longitude is less than -180°"),0!==r.length)return new Error(r.join(" "))}var r=(n.distance=function(t,r,n){void 0===n&&(n="km");var e=c(t);if(e instanceof Error)throw new Error("Start coordinates: "+e.message);var o=c(r);if(o instanceof Error)throw new Error("End coordinates: "+o.message);var a="miles"===n.toLowerCase()?3963:6371,i=l(r.lat-t.lat),s=l(r.lng-t.lng),f=l(t.lat),h=l(r.lat),u=Math.sin(i/2)*Math.sin(i/2)+Math.sin(s/2)*Math.sin(s/2)*Math.cos(f)*Math.cos(h);return a*(2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u)))},n.hash=function(t,r){void 0===r&&(r=10);var n=c(t);if(n instanceof Error)throw n;for(var e,o="",a=[-90,90],i=[-180,180];o.length<r;){for(var s=0,f=0;f<5;f++){var h=(5*o.length+f)%2==0,u=h?t.lng:t.lat,l=h?i:a,d=(l[0]+l[1])/2;s=(s<<1)+(u<((e=l)[0]+e[1])/2?0:1),d<u?l[0]=d:l[1]=d}o+="0123456789bcdefghjkmnpqrstuvwxyz".charAt(s)}return o},n.decodeHash=function(t){for(var r,n=!0,e=[-90,90],o=[-180,180],a=t.split("");a.length;)for(var i=(r=a.shift(),"0123456789bcdefghjkmnpqrstuvwxyz".indexOf(r.toLowerCase())),s=0;s<5;s++){var f=[16,8,4,2,1][s],h=n?o:e,u=(h[0]+h[1])/2;h[i&f?0:1]=u,n=!n}return{lat:(e[0]+e[1])/2,lng:(o[0]+o[1])/2}},n);function n(){}t.Geokit=r,Object.defineProperty(t,"__esModule",{value:!0})}); |
@@ -1,2 +0,2 @@ | ||
import { LatLngLiteral } from './interfaces'; | ||
import { LatLngLiteral } from './definitions'; | ||
/** | ||
@@ -3,0 +3,0 @@ * Get Base 32 symbol from decimal chunk (5 bit binary value). |
export { Geokit } from './geokit'; | ||
export * from './interfaces'; | ||
export * from './definitions'; |
{ | ||
"name": "geokit", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "An assortment of geolocation related tools, all packaged in one easy to use kit.", | ||
@@ -45,19 +45,17 @@ "scripts": { | ||
"devDependencies": { | ||
"@types/chai": "^4.1.4", | ||
"@types/mocha": "^5.2.5", | ||
"chai": "^4.1.2", | ||
"coveralls": "^3.0.2", | ||
"firebase-tools": "^4.0.3", | ||
"generate-changelog": "^1.7.1", | ||
"mocha": "^5.2.0", | ||
"nyc": "^12.0.2", | ||
"rollup": "^0.64.1", | ||
"rollup-plugin-commonjs": "^9.1.5", | ||
"rollup-plugin-copy": "^0.2.3", | ||
"rollup-plugin-node-resolve": "^3.3.0", | ||
"rollup-plugin-typescript2": "^0.16.1", | ||
"rollup-plugin-uglify": "^4.0.0", | ||
"ts-node": "^7.0.0", | ||
"typedoc": "^0.11.1", | ||
"typescript": "^3.0.1" | ||
"@types/chai": "4.x.x", | ||
"@types/mocha": "5.x.x", | ||
"chai": "4.x.x", | ||
"coveralls": "3.x.x", | ||
"firebase-tools": "7.x.x", | ||
"generate-changelog": "1.x.x", | ||
"mocha": "6.x.x", | ||
"nyc": "14.x.x", | ||
"rollup": "1.x.x", | ||
"rollup-plugin-copier": "1.x.x", | ||
"rollup-plugin-typescript2": "0.x.x", | ||
"rollup-plugin-uglify": "6.x.x", | ||
"ts-node": "8.x.x", | ||
"typedoc": "0.x.x", | ||
"typescript": "3.x.x" | ||
}, | ||
@@ -64,0 +62,0 @@ "nyc": { |
@@ -52,2 +52,2 @@ # geokit | ||
const coordinates: LatLngLiteral = Geokit.decodeHash(hash); // coordinates === { lat: -33.86881113052368, lng: 151.2093186378479 } | ||
``` | ||
``` |
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
Mixed license
License(Experimental) Package contains multiple licenses.
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
25197
15
53
11
1