genosdb 0.7.1 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Geo.min.js +1 -1
- package/dist/Geo.min.js.gz +0 -0
- package/dist/gdb.min.js +1 -1
- package/dist/gdb.min.js.gz +0 -0
- package/dist/index.js +1 -1
- package/dist/index.js.gz +0 -0
- package/dist/radixIndex.min.js +1 -1
- package/dist/radixIndex.min.js.gz +0 -0
- package/dist/sm.min.js +2 -2
- package/dist/sm.min.js.gz +0 -0
- package/package.json +1 -1
package/dist/Geo.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function K(C){console.log("\uD83D\uDCCD Extending GDB with geolocation operators...");const H={$near:(p,j)=>{console.log("\u2139\uFE0F Geo: Ejecutando operador $near");const{latitude:b,longitude:k,radius:f}=j;if(typeof b!=="number"||typeof k!=="number"||typeof f!=="number")return console.error("\u274C Geo: Consulta inv\xE1lida para $near:",j),!1;const A=p?.latitude||p?.location?.latitude,E=p?.longitude||p?.location?.longitude;if(typeof A!=="number"||typeof E!=="number")return!1;return I(A,E,b,k)<=f},$bbox:(p,j)=>{console.log("\u2139\uFE0F Geo: Ejecutando operador $bbox");const{minLat:b,maxLat:k,minLng:f,maxLng:A}=j;if(typeof b!=="number"||typeof k!=="number"||typeof f!=="number"||typeof A!=="number")return console.error("\u274C Geo: Consulta inv\xE1lida para $bbox:",j),!1;const E=p?.latitude||p?.location?.latitude,z=p?.longitude||p?.location?.longitude;if(typeof E!=="number"||typeof z!=="number")return!1;return E>=b&&E<=k&&z>=f&&z<=A}};function I(p,j,b,k){const f=(J)=>J*Math.PI/180,E=f(b-p),z=f(k-j),F=Math.sin(E/2)*Math.sin(E/2)+Math.cos(f(p))*Math.cos(f(b))*Math.sin(z/2)*Math.sin(z/2);return 6371*(2*Math.atan2(Math.sqrt(F),Math.sqrt(1-F)))}return C.operators={...C.operators,...H},C}var N=(C)=>{return console.log("\u2705 Geo: + Geolocation operators."),K(C)};export{K as withModule,N as init};
|
package/dist/Geo.min.js.gz
CHANGED
|
Binary file
|