cypher-beautifier
TypeScript icon, indicating that this package has built-in type declarations

0.0.12 • Public • Published

Cypher Beautifier

HitCount

A simple NPM package that formats and beautifies Cypher queries for improved readability

NPM

https://nodei.co/npm/cypher-beautifier.png?downloads=true&downloadRank=true&stars=true

Installation

npm install cypher-beautifier

Usage

import beautifyCypher from "cypher-beautifier";

const query = `
    match (n) where n.name = "Bob" return n limit 1
`;

const formatted = beautifyCypher(query);

console.log(formatted);

/*
MATCH (n)
WHERE n.name = "Bob"
RETURN n
LIMIT 1
 */

API

interface IProps {
  parseStrings?: boolean;
}
declare function beautifyCypher(query: string, options?: IProps): string;
export default beautifyCypher;
Option Type Description Default
parseStrings boolean If true formats code inside quotation marks ' and " false

Package Sidebar

Install

npm i cypher-beautifier

Weekly Downloads

4

Version

0.0.12

License

GPL-3.0

Unpacked Size

45.7 kB

Total Files

7

Last publish

Collaborators

  • dmitriig