node-file-parser by Skelware

API Docs for: 2.2.2
Show:

ini

Module: Parsers

Summary

Methods

_getNewSection

Syntax

_getNewSection

(
  • [line]
)
String private

Summary

Checks whether a line indicates a new section or not.

Parameters:

  • [line] String optional

    The line to check.

Returns:

String:

The section name, if found.

_isComment

Syntax

_isComment

(
  • [line]
)
Boolean private

Summary

Checks whether a line is a comment or not.

Parameters:

  • [line] String optional

    The line to check.

Returns:

Boolean:

_isNotValidIni

Syntax

_isNotValidIni

(
  • [line]
)
Boolean private

Summary

Checks whether the line contains only valid ini syntax or not.

Parameters:

  • [line] String optional

    The line to check.

Returns:

Boolean:

decode

Syntax

decode

(
  • [data]
)
Object

Summary

Decodes an ini string to an ini object.

Parameters:

  • [data] String optional

    A string of data to be decoded.

Returns:

Object:

A new object with two primary keys: global and section.

encode

Syntax

encode

(
  • [data]
)
String

Summary

Encodes an ini object into an ini string that can be written to a file.

Parameters:

  • [data] Object optional

    An ini object formatted as explained in the class description.

Returns:

String:

A valid ini representation of the data.

Parser

Syntax

Parser

()

Summary