Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Reworked README #235

Merged
merged 2 commits into from
Dec 4, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Removed certain formatting on request
  • Loading branch information
PhoneDroid committed Dec 3, 2023
commit c0d629af18d9feb7c4171b7fdeb21e11ee98764b
29 changes: 0 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,12 @@

<br>

<div align = center >

An INI format parser & serializer.

</div>

<br>
<br>

## Note

- Sections are treated as nested objects.

- Section-less items are treated as globals.

<br>
<br>

## Usage

Consider an INI file such as the following:
Expand All @@ -39,8 +27,6 @@ array[] = second value
array[] = third value
```

<br>

You can **read**, **modify** and **write** it like so:

```js
Expand Down Expand Up @@ -76,8 +62,6 @@ text = stringify(config,{
await writeFile(`./Modified.ini`,text)
```

<br>

The written file will contain the following:

```ini
Expand All @@ -95,13 +79,8 @@ array[]=third value
array[]=fourth value
```

<br>
<br>

## API

<br>

### Parse

Attempts to turn the given INI string into a nested data object.
Expand All @@ -111,8 +90,6 @@ Attempts to turn the given INI string into a nested data object.
const object = parse(`<INI Text>`)
```

<br>

### Stringify

Encodes the given data object as an INI formatted string.
Expand Down Expand Up @@ -180,17 +157,13 @@ stringify(object,{
})
```

<br>

*For backwards compatibility any string passed as the*
*options parameter is treated as the `section` option.*

```js
stringify(object,'section')
```

<br>

### Un / Escape

Turn the given string into a safe to
Expand All @@ -205,5 +178,3 @@ Or reverse the process with:
```js
unsafe(`\\"safe string\\"`) // -> "safe string"
```

<br>
Loading