UNPKG

@neo4j/cypher-builder

Version:

A programmatic API for building Cypher queries for Neo4j

16 lines (15 loc) 510 B
"use strict"; /* * Copyright (c) "Neo4j" * Neo4j Sweden AB [http://neo4j.com] */ Object.defineProperty(exports, "__esModule", { value: true }); exports.toCypherParams = toCypherParams; const Param_1 = require("../references/Param"); /** Converts an object into an object of Param so it can easily be passed to a pattern. */ function toCypherParams(original) { return Object.entries(original).reduce((acc, [key, value]) => { acc[key] = new Param_1.Param(value); return acc; }, {}); }