UNPKG

@neo4j/cypher-builder

Version:

A programmatic API for building Cypher queries for Neo4j

16 lines (15 loc) 439 B
"use strict"; /* * Copyright (c) "Neo4j" * Neo4j Sweden AB [http://neo4j.com] */ Object.defineProperty(exports, "__esModule", { value: true }); exports.asArray = asArray; /** Makes sure input is an array, if not it turns into an array (empty array if input is null or undefined) */ function asArray(raw) { if (Array.isArray(raw)) return raw; if (raw === undefined || raw === null) return []; return [raw]; }