Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@loaders.gl/gis

Package Overview
Dependencies
Maintainers
9
Versions
260
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@loaders.gl/gis - npm Package Compare versions

Comparing version 4.0.0-alpha.21 to 4.0.0-alpha.22

2

dist/es5/lib/transform.js

@@ -55,4 +55,4 @@ "use strict";

function isCoord(array) {
return Number.isFinite(array[0]) && Number.isFinite(array[1]);
return Array.isArray(array) && Number.isFinite(array[0]) && Number.isFinite(array[1]);
}
//# sourceMappingURL=transform.js.map

@@ -38,4 +38,4 @@ export function transformBinaryCoords(binaryFeatures, transformCoordinate) {

function isCoord(array) {
return Number.isFinite(array[0]) && Number.isFinite(array[1]);
return Array.isArray(array) && Number.isFinite(array[0]) && Number.isFinite(array[1]);
}
//# sourceMappingURL=transform.js.map

@@ -1,2 +0,2 @@

import type { BinaryFeatures } from '@loaders.gl/schema';
import type { BinaryFeatures, Feature } from '@loaders.gl/schema';
type TransformCoordinate = (coord: number[]) => number[];

@@ -17,4 +17,4 @@ /**

*/
export declare function transformGeoJsonCoords(features: object[], fn: (coord: number[]) => number[]): object[];
export declare function transformGeoJsonCoords(features: Feature[], fn: (coord: number[]) => number[]): Feature[];
export {};
//# sourceMappingURL=transform.d.ts.map

@@ -58,3 +58,3 @@ "use strict";

function isCoord(array) {
return Number.isFinite(array[0]) && Number.isFinite(array[1]);
return Array.isArray(array) && Number.isFinite(array[0]) && Number.isFinite(array[1]);
}
{
"name": "@loaders.gl/gis",
"description": "Helpers for GIS category data",
"version": "4.0.0-alpha.21",
"version": "4.0.0-alpha.22",
"license": "MIT",

@@ -27,4 +27,4 @@ "publishConfig": {

"dependencies": {
"@loaders.gl/loader-utils": "4.0.0-alpha.21",
"@loaders.gl/schema": "4.0.0-alpha.21",
"@loaders.gl/loader-utils": "4.0.0-alpha.22",
"@loaders.gl/schema": "4.0.0-alpha.22",
"@mapbox/vector-tile": "^1.3.1",

@@ -37,3 +37,3 @@ "@math.gl/polygon": "^3.5.1",

},
"gitHead": "df5d670b136192b26941396e944f9c46be788e83"
"gitHead": "0da838c506d1275383f2fd3d244d9c72b25397d2"
}

@@ -1,2 +0,2 @@

import type {BinaryFeatures, BinaryGeometry} from '@loaders.gl/schema';
import type {BinaryFeatures, BinaryGeometry, Feature} from '@loaders.gl/schema';

@@ -47,5 +47,5 @@ type TransformCoordinate = (coord: number[]) => number[];

export function transformGeoJsonCoords(
features: object[],
features: Feature[],
fn: (coord: number[]) => number[]
): object[] {
): Feature[] {
for (const feature of features) {

@@ -58,8 +58,8 @@ // @ts-ignore

function coordMap(array, fn) {
function coordMap(array: unknown, fn: (coord: number[]) => number[]): unknown[] {
if (isCoord(array)) {
return fn(array);
return fn(array as number[]);
}
return array.map((item) => {
return (array as unknown[]).map((item) => {
return coordMap(item, fn);

@@ -69,4 +69,4 @@ });

function isCoord(array) {
return Number.isFinite(array[0]) && Number.isFinite(array[1]);
function isCoord(array: unknown) {
return Array.isArray(array) && Number.isFinite(array[0]) && Number.isFinite(array[1]);
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc