New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@mapbox/graph-normalizer

Package Overview
Dependencies
Maintainers
181
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mapbox/graph-normalizer - npm Package Compare versions

Comparing version 2.3.2 to 2.3.3

test/fixtures/merge-ways/1-way-loop-with-exit/after

17

lib/split-ways.js

@@ -11,6 +11,11 @@ 'use strict';

ways.forEach(function (way) {
way.properties.refs.forEach(function (ref) {
way.properties.refs.forEach(function (ref, i) {
if (!nodeHash[ref]) nodeHash[ref] = {};
nodeHash[ref][way.properties.id] = true;
if (way.properties.oneway === 0) {
nodeHash[ref][way.properties.id + '!' + i] = true;
} else {
nodeHash[ref][way.properties.id] = true;
}
});

@@ -45,3 +50,3 @@ });

// persist oneway, highway, bridge, tunnel tags if they are present
// persist oneway, highway, bridge, tunnel, name, and ref tags if they are present
if (way.properties.hasOwnProperty('oneway')) waySlice.properties.oneway = way.properties.oneway;

@@ -51,2 +56,4 @@ if (way.properties.hasOwnProperty('highway')) waySlice.properties.highway = way.properties.highway;

if (way.properties.hasOwnProperty('tunnel')) waySlice.properties.tunnel = way.properties.tunnel;
if (way.properties.hasOwnProperty('name')) waySlice.properties.name = way.properties.name;
if (way.properties.hasOwnProperty('ref')) waySlice.properties.ref = way.properties.ref;

@@ -71,3 +78,3 @@ splitWays.push(waySlice);

// persist oneway, highway, bridge, and tunnel tags if they are present
// persist oneway, highway, bridge, tunnel, name, and ref tags if they are present
if (way.properties.hasOwnProperty('oneway')) waySlice.properties.oneway = way.properties.oneway;

@@ -77,2 +84,4 @@ if (way.properties.hasOwnProperty('highway')) waySlice.properties.highway = way.properties.highway;

if (way.properties.hasOwnProperty('tunnel')) waySlice.properties.tunnel = way.properties.tunnel;
if (way.properties.hasOwnProperty('name')) waySlice.properties.name = way.properties.name;
if (way.properties.hasOwnProperty('ref')) waySlice.properties.ref = way.properties.ref;

@@ -79,0 +88,0 @@ splitWays.push(waySlice);

{
"name": "@mapbox/graph-normalizer",
"version": "2.3.2",
"version": "2.3.3",
"description": "Takes nodes and ways and turn them into a normalized graph of intersections and ways.",

@@ -5,0 +5,0 @@ "bin": "./bin/normalize-ways",

@@ -12,3 +12,3 @@ # Graph-normalizer

`npm install @mapbox/graph-normlizer`
`npm install @mapbox/graph-normalizer`

@@ -15,0 +15,0 @@ ### Usage

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