0.1.12 • Published 10 years ago

hoconfig-js v0.1.12

Weekly downloads
176
License
-
Repository
github
Last release
10 years ago

hoconfig-js

Introduce

HOConfig (Human Optimized Config) keep the semantics from JSON, but make it more convenient as a human-editable config file format for reading and typing.

examples

# hoconfig is a json like configuration syntax, optimized for human reading and typing
# - support single line comment
# - omit root braces
# - the "," between member is optional

name : "Mingqi Shao",       # - string can be double quotation
title : 'engineer'          # - string can be single quotation. 
sex : male                  # - string even can no quotation
age : 33                    # - number will be auto detected
married : true              # - boolean as well
job : null                  # - support null. 
kids = 2                    # - key value separator can be = other than :
languanges : [
    java, ruby, clojure
    python, node.js]        # - this is Array
address :  {                # - this is recursive object
    country : china
    city : beijing
  }

singleQuotaString : 'this is "hoconfig" and escape \ is \'
doubleQuotaString : "this is 'hoconfig' and escape \ is \"

install

npm install hoconfig-js

use

var hoconfig = require('hoconfig-js')
config = hoconfig('/the/path/of/config')

the return value of hoconfig() is a object. hocnfig also accept string and buffer other than file path

0.1.12

10 years ago

0.1.11

10 years ago

0.1.10

10 years ago

0.1.9

10 years ago

0.1.8

10 years ago

0.1.7

10 years ago

0.1.6

10 years ago

0.1.5

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago