1.0.2 • Published 5 months ago

@sryden/unit v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
5 months ago

SRYDEN Unit

This is a Node.js module for reading and parsing basic SRYDEN Unit files.

Installation

npm install @sryden/unit

Example

index.js:

const unit = require('@sryden/unit');

// Example settings file
const settings = unit.file('./settings.unit');

if (settings) {
    console.log(settings.myCategory.setting1);
    console.log(settings.myOtherCategory.setting2);
} else {
    console.error('Failed to load settings from file.');
}

settings.unit:

// Note: These are categories which contain settings and arrays
// Unit version 1.0.0

myCategory {
    "setting1": "hello world",
    "someArray": [
        "1",
        "2"
    ]
}

MyOtherCategory {
    "setting2": "hello world"
}
1.0.2

5 months ago

1.0.1

5 months ago

1.0.0

5 months ago