graph: Get a dependencies for the list of cells

node v10.24.1
version: 1.0.0
endpointsharetweet
const { BemGraph } = require('@bem/sdk.graph'); const graph = new BemGraph(); graph.vertex({ block: 'a' }) .linkWith({ block: 'b' }); graph.vertex({ block: 'c' }) .dependsOn({ block: 'd'}); const cells = [ { block: 'a'}, { block: 'c'} ] graph.dependenciesOf(cells); // => [ // { "entity": {"block": "a"}}, // { "entity": {"block": "d"}}, // { "entity": {"block": "c"}} // { "entity": {"block": "b"}} // ]
Loading…

no comments

    sign in to comment