Prismatic's «Graph» implementation in JavaScript