Socket
Book a DemoInstallSign in
Socket

@ethan_arrowood/graphy

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ethan_arrowood/graphy

A not so serious graph database

latest
Source
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

Graphy ⛄️

A not so serious graph database written in TypeScript and operating in memory.

npm i @ethan_arrowood/graphy

Example

Input:

import Graphy from '@ethan_arrowood/graphy'

// For JS users:
// const { Graphy } = require('@ethan_arrowood/graphy') 

const db = new Graphy()

const nodeA = db.addNode('a')
const nodeB = db.addNode('b')
const nodeC = db.addNode('c')

const relation1 = db.addRelation('foo', nodeA, nodeB)
const relation2 = db.addRelation('bar', nodeB, nodeC)

console.log(nodeA.toString())
console.log(nodeB.toString())
console.log(nodeC.toString())

console.log(relation1.toString())
console.log(relation2.toString())

Output:

GraphyNode [1]: a
GraphyNode [2]: b
GraphyNode [3]: c
GraphyRelationship [4]: (1)-(foo)-(2)
GraphyRelationship [5]: (2)-(bar)-(3)

Keywords

typescript

FAQs

Package last updated on 27 Nov 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts