I'm Adrien Readme ๐
๐๏ธ In Building
๐ป Stay tuned!
โ๏ธ Configue All the Things.js ๐ง
License: Other
Envars and argv provided to configue which utilize the 'separator' feature for nested config json objects do not transform the names of nested variables. So a argv or envar such as deep__four_two, should yield {deep: { fourTwo: '42' }} but instead yields {deep: { four_two: '42' }}.
it('get nested, normalized value with underscores as a separator', (done) => {
process.env.deep__four_two = '42';
const configue = Configue({env: {normalize: true}, separator: '__'});
// FIXIT: deep is { four_two: '42' } should be { fourTwo: '42' }
expect(configue.get('deep.fourTwo')).to.equal('42');
done();
});
I may poke around and see if I can contribute a fix unless one is obvious to you or this is expected behavior.
Thanks!
Hi, I've been trying out configue for a project I'm working on. So far it's been good, thanks!
I did notice one thing that looks to be a corner case not covered by your tests. It appears that the normalize option and the env whitelist may not play well together. When I attempt to use both the configue.get returns 'undefined' for any whitelisted envars.
"configue": "^1.0.0-rc.4",
it('normalize works with the env whitelist option', (done) => {
process.env.NO_SEP = 'no sep';
const configue = new Configue({
normalize: 'camelCase',
env: {
whitelist: ['NO_SEP']
},
});
process.env.NO_SEP = undefined;
expect(configue.get('noSep')).to.equal('no sep');
done();
});
it('normalize works by itself', (done) => {
process.env.NO_SEP = 'no sep';
const configue = new Configue({
normalize: 'camelCase',
env: {
// whitelist: ['NO_SEP']
},
});
process.env.NO_SEP = undefined;
expect(configue.get('noSep')).to.equal('no sep');
done();
});
Hi all
I use HAPI JS and would like to use your package. Is it still maintained? I see that some version of dependency are not up to date, can you give a sign of life. I could help if you continue the project
Hi
I am wondering what sort of config this plugin is designed for. Plugins are called after hapi options are passed to its api so cannot be used to configure much with internals of hapi such as server options or server connections.
Thanks
Simon
If you are not aware yet, Hapi v17 is making the transition from callbacks to async
/await
, as well as deprecating some other rarely used functionality. This is a breaking change that may make your plugin no longer compatible with the Hapi API.
Draft release notes can be found here: hapijs/hapi#3658
The target release date for v17 is the beginning of November.
async
/await
compatible using the v17
branch from Hapi for testing
npm link
within the Hapi reponpm link hapi
within your plugin repov17
of Hapi branch for testsnpm
. Please use a major version increment as this will be a breaking change and it would be terrible for it to sneak into current versions of Hapi.<8.0.0
.v16
will continue to be supported for as long as there exists a Node LTS actively being supported that is not compatible with v17
.A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.