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

@koopjs/winnow

Package Overview
Dependencies
Maintainers
7
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@koopjs/winnow - npm Package Compare versions

Comparing version 4.0.2 to 4.0.3

2

package.json
{
"name": "@koopjs/winnow",
"version": "4.0.2",
"version": "4.0.3",
"description": "Apply sql-like filters to GeoJSON",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -5,3 +5,3 @@ const _ = require('lodash');

module.exports = function transformToEsriProperties (inputProperties, geometry, delimitedDateFields, requiresObjectId, idField) {
module.exports = function transformToEsriProperties (properties, geometry, delimitedDateFields, requiresObjectId, idField) {
requiresObjectId = requiresObjectId === 'true';

@@ -11,18 +11,17 @@ idField = idField === 'null' ? null : idField;

const dateFields = delimitedDateFields.split(',');
const properties = transformProperties(inputProperties, dateFields);
if (requiresObjectId && !idField) {
return injectObjectId({ properties, geometry });
properties = injectObjectId({ properties, geometry });
}
if (requiresObjectId && shouldLogIdFieldWarning(properties[idField])) {
logger.debug(`OBJECTIDs created from provider's "idField" (${idField}: ${inputProperties[idField]}) are not integers from 0 to 2147483647`);
logger.debug(`OBJECTIDs created from provider's "idField" (${idField}: ${properties[idField]}) are not integers from 0 to 2147483647`);
}
return properties;
return transformProperties(properties, dateFields);
};
function injectObjectId (feature) {
const { properties } = feature;
const OBJECTID = createIntegerHash(JSON.stringify(feature));
const { properties, geometry } = feature;
const OBJECTID = createIntegerHash(JSON.stringify({ properties, geometry }));
return {

@@ -34,4 +33,4 @@ ...properties,

function shouldLogIdFieldWarning (idField) {
return (!Number.isInteger(idField) || idField > 2147483647);
function shouldLogIdFieldWarning (idFieldValue) {
return idFieldValue && (!Number.isInteger(idFieldValue) || idFieldValue > 2147483647);
}

@@ -38,0 +37,0 @@

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