anvaka / anvaka/ngraph.tobinary

Option to choose how to retrieve label and shadowed variable

Open
#4 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
11
Forks
8
PR merge metrics
No merged PRs in 30d

Description

It appears that your ngraph.gexf library outputs integer IDs, and then this library uses `node.id` as the label. What if you wanted text labels?

While modifying the code to achieve that for myself I was getting weird behavior. I noticed that you were shadowing `node` here

https://github.com/anvaka/ngraph.tobinary/blob/master/lib/getLinksBuffer.js#L15
https://github.com/anvaka/ngraph.tobinary/blob/master/lib/getLinksBuffer.js#L20

Once I renamed the second to `otherNode` it worked.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in lib/getLinksBuffer.js at the referenced lines 15 and 20, tracing how node IDs become labels and where the variable is shadowed. Define the supported label-retrieval choice from the issue's expected behavior, remove the ambiguity, and verify that graphs with text labels serialize with those labels while existing integer-ID behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.