Open
Description
nodejs version: all
nconf version: v0.11.3
Steps to Reproduce
- Create an application that uses nconf with env parsing and the following defaults.
const conf = require("nconf")
.env({
separator: "__",
parseValues: true,
});
conf.defaults({
myarray: ["value1"]
});
- Launch the application with the following environment variable passed in.
myarray__1=value2
Expected Results
The resulting array has two values.
const myarray = conf.get("myarray");
// [
// 0: 'value1',
// 1: 'value2'
// ]
Actual Results
The result is transformed to an object with one value, value2
with key 1
. The first value of key 0
is missing and the object is not iterable.
const myarray = conf.get("myarray");
// {
// 1: 'value2'
// }
Metadata
Metadata
Assignees
Labels
No labels