Skip to content
This repository has been archived by the owner on Mar 21, 2023. It is now read-only.
/ lofig Public archive
forked from jonathan-grah/lofig

Like the config package, but for client side JavaScript

Notifications You must be signed in to change notification settings

Musare/lofig

 
 

Repository files navigation

lofig

npmjs.com/package/config, but for client side JavaScript

Installation

npm install lofig --save --production

You can also use https://unpkg.com/lofig@latest/dist/lofig.min.js.

Usage

import 'lofig' from 'lofig'; // not necessary if using CDN Link

// change config folder
lofig.folder = 'config/default.json';

// check if property exists
await lofig.has('secret');

// return property
await lofig.get('secret');

// NOTE: You can also use callbacks e.g.
lofig.get('secret', res => {
	console.log('secret', res);
})

Development

Run npm run dev to use webpack-dev-server for development purposes.

About

Like the config package, but for client side JavaScript

Resources

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 77.4%
  • HTML 22.6%