File tree Expand file tree Collapse file tree 6 files changed +8
-12
lines changed Expand file tree Collapse file tree 6 files changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -42,9 +42,9 @@ export class MapExpr implements CypherCompilable {
4242 if ( typeof keyOrValues === "string" ) {
4343 this . setField ( keyOrValues , value ) ;
4444 } else {
45- Object . entries ( keyOrValues ) . forEach ( ( [ key , value ] ) => {
45+ for ( const [ key , value ] of Object . entries ( keyOrValues ) ) {
4646 this . setField ( key , value ) ;
47- } ) ;
47+ }
4848 }
4949 }
5050
Original file line number Diff line number Diff line change @@ -101,9 +101,9 @@ export class MapProjection implements CypherCompilable {
101101 }
102102
103103 private setExtraValues ( values : Record < string , Expr > ) : void {
104- Object . entries ( values ) . forEach ( ( [ key , value ] ) => {
104+ for ( const [ key , value ] of Object . entries ( values ) ) {
105105 if ( ! value ) throw new Error ( `Missing value on map key ${ key } ` ) ;
106106 this . extraValues . set ( key , value ) ;
107- } ) ;
107+ }
108108 }
109109}
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ class RunFirstColumnFunction extends CypherFunction {
8585 }
8686
8787 private escapeQuery ( query : string ) : string {
88- return query . replace ( / ( [ " \\ ] ) / g, "\\$1" ) ;
88+ return query . replaceAll ( / ( [ " \\ ] ) / g, "\\$1" ) ;
8989 }
9090
9191 private parseVariablesInput ( variables : Variable [ ] | MapExpr | Record < string , Expr > ) : Variable [ ] | MapExpr {
Original file line number Diff line number Diff line change @@ -31,11 +31,7 @@ export class Variable {
3131 /**
3232 * @internal
3333 */
34- public prefix : string ;
35-
36- constructor ( ) {
37- this . prefix = "var" ;
38- }
34+ public prefix : string = "var" ;
3935
4036 /** Access individual property via the PropertyRef class */
4137 public property ( ...path : Array < string | Expr > ) : PropertyRef {
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ function escapeString(str: string): string {
6666}
6767
6868function normalizeString ( str : string ) : string {
69- return str . replace ( / \\ u 0 0 6 0 / g, "`" ) ;
69+ return str . replaceAll ( / \\ u 0 0 6 0 / g, "`" ) ;
7070}
7171
7272function needsEscape ( str : string ) : boolean {
Original file line number Diff line number Diff line change 1919
2020export function padBlock ( block : string , spaces = 4 ) : string {
2121 const paddingStr = " " . repeat ( spaces ) ;
22- const paddedNewLines = block . replace ( / \n / g, `\n${ paddingStr } ` ) ;
22+ const paddedNewLines = block . replaceAll ( / \n / g, `\n${ paddingStr } ` ) ;
2323 return `${ paddingStr } ${ paddedNewLines } ` ;
2424}
You can’t perform that action at this time.
0 commit comments