Comparing version 0.1.3 to 0.1.4
{ | ||
"name": "constantly", | ||
"description": "Parse constant files and put them in a frozen object", | ||
"version": "0.1.3", | ||
"description": "Parse constant definition files and put them into a frozen object", | ||
"version": "0.1.4", | ||
"preferGlobal": "false", | ||
"main": "index.js", | ||
"author": "Daily Raisin LLC ", | ||
"author": "Daily Raisin LLC", | ||
"repository" : { | ||
@@ -9,0 +9,0 @@ "type": "git", |
@@ -7,3 +7,3 @@ # Constantly | ||
Given an `example.json` structure like this which defines two `ACCOUNT.TYPE`s, `USER` and `ADMIN`: | ||
Given an `example.json` structure like this: | ||
@@ -31,17 +31,20 @@ [{ | ||
var path = require('path'); | ||
var $C = constantly(require(path.resolve('example.json'))); //pass it real JSON | ||
var admin = $C.ACCOUNT.TYPE.ADMIN.value; //200 | ||
var user = $C.ACCOUNT.TYPE.USER.value; //100 | ||
## JSON Setup | ||
You are required to define a feature, category, and property to “namespace” each constant. | ||
## JSON Format | ||
### Comments | ||
Comments are useful for authors of the source JSON but are ignored otherwise. | ||
You are required to define a `feature`, `category`, and `property` to “namespace” each constant. | ||
### Sequence | ||
Sequence is used for ordering properties in UI. | ||
### `Comment` | ||
`Comment`s are useful for authors of the source JSON, but are ignored upon converting into an object. | ||
### `Sequence` | ||
`Sequence` is used for ordering properties in UI. | ||
## Example | ||
@@ -53,2 +56,2 @@ | ||
- validate JSON to match this pattern upon injestion | ||
- validate JSON to match the prescribed pattern upon injestion |
9161
54