Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,18 @@ The written file will contain the following:
```ini
[section]
scope=local

[section.database]
user=dbuser
password=dbpassword
database=use_another_database

[section.paths.default]
tmpdir=/tmp
array[]=first value
array[]=second value
array[]=third value
array[]=fourth value
tmpdir=/tmp
```

## API
Expand Down Expand Up @@ -170,11 +172,13 @@ Turn the given string into a safe to
use key or value in your INI file.

```js
safe(`"unsafe string"`) // -> \"unsafe string\"
import { safe, unsafe } from 'ini'

safe('a=b') // -> '"a=b"'
```

Or reverse the process with:

```js
unsafe(`\\"safe string\\"`) // -> "safe string"
unsafe('"a=b"') // -> 'a=b'
```