![]() |
5 lat temu | |
---|---|---|
dist | 5 lat temu | |
example | 5 lat temu | |
.gitignore | 5 lat temu | |
.npmignore | 5 lat temu | |
README.md | 5 lat temu | |
lofig.js | 5 lat temu | |
package.json | 5 lat temu | |
webpack.config.js | 5 lat temu |
npmjs.com/package/config for client side JavaScript
npm install lofig --save --production
You can also use https://unpkg.com/lofig@latest/dist/lofig.min.js.
import 'lofig' from 'lofig'; // not necessary if using CDN Link
// change config folder
lofig.folder = 'config/default.json';
// check if property exists
lofig.has('secret', res => {});
// return property
lofig.get('secret', res => {});
See example folder for more details.