Socket
Socket
Sign inDemoInstall

grad-school

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grad-school - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

2

package.json
{
"name": "grad-school",
"version": "0.0.3",
"version": "0.0.4",
"description": "graph logic and traversal",

@@ -5,0 +5,0 @@ "main": "./builds/grad-school.cjs",

<div align="center">
<img src="https://cloud.githubusercontent.com/assets/399657/23590290/ede73772-01aa-11e7-8915-181ef21027bc.png" />
<div>graph-traversal library</div>
<div>cute graph-traversal</div>
<a href="https://npmjs.org/package/grad-school">

@@ -27,8 +27,10 @@ <img src="https://img.shields.io/npm/v/grad-school.svg?style=flat-square" />

it's surprising how there's no super-clear way to author graph-data.
it's surprising how there's no super-clear way to author graph-data, or even think about.
It always hurts my head. Even simple graphs do.
Maybe i have a head-problem, or maybe JSON is just an awkward way to think-about graphs.
Maybe i have a head-problem, or maybe JSON is just an awkward way to represent graphs.
either way...
library is like, 3kb.

@@ -41,5 +43,5 @@

### Ok, graphs:
### Ok, graphs -
This library supports 3 formats:
we support 3 formats:

@@ -110,3 +112,3 @@ ### String-format

## JS api
## JS API

@@ -116,6 +118,4 @@ you can also easily mess-around with the graph:

```js
import Grad from 'grad-school'
let g = grad('a -> a1')
let g = new Grad('a -> a1')
// add new nodes

@@ -134,3 +134,3 @@ g.add('b').add(['b1', 'b2'])

you can 'deduce', down the tree, and intellegently merge the data of each node:
you can 'deduce', down the tree, and intellegently merge the properties of each node:

@@ -149,3 +149,3 @@ ```js

// reach down and get a leaf
// check a c-leaf
g.get('c/c1/c2').json.props

@@ -166,5 +166,8 @@ // { inC: true }

let g = grad(str)
// add data to root
g.props({ list: ['fromRoot'] })
// add data to child
g.get('a').props({ list: ['fromA'] })
g.fillDown()
// b-side has root-data

@@ -171,0 +174,0 @@ let have = g.get('b/b1').json.props

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