Skip to content

Commit 264e30f

Browse files
authored
docs: require to import (brianc#3448)
1 parent f528433 commit 264e30f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/pages/apis/utilities.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { Alert } from '/components/alert.tsx'
99
Escapes a string as a [SQL identifier](https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS).
1010

1111
```js
12-
const { escapeIdentifier } = require('pg')
12+
import { escapeIdentifier } from 'pg';
1313
const escapedIdentifier = escapeIdentifier('FooIdentifier')
1414
console.log(escapedIdentifier) // '"FooIdentifier"'
1515
```
@@ -27,7 +27,7 @@ console.log(escapedIdentifier) // '"FooIdentifier"'
2727
Escapes a string as a [SQL literal](https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-CONSTANTS).
2828

2929
```js
30-
const { escapeLiteral } = require('pg')
30+
import { escapeLiteral } from 'pg';
3131
const escapedLiteral = escapeLiteral("hello 'world'")
3232
console.log(escapedLiteral) // "'hello ''world'''"
3333
```

0 commit comments

Comments
 (0)