nconf icon indicating copy to clipboard operation
nconf copied to clipboard

disable merge object for response

Open fundon opened this issue 10 years ago • 4 comments

I used toml to customize format. And the date will be parse to Date Object. The behavior of nconf will merge the response(Date Object). How to disable it?

fundon avatar Apr 03 '15 21:04 fundon

@fundon could you provide a code example?

jcrugzz avatar Apr 04 '15 21:04 jcrugzz

e.g.

app.test.toml

date = 1979-05-27T07:32:00Z

confi.js

var toml = require('toml');
var nconf = require('nconf');

nconf.add('user', {
  type: 'file', file: __dirname + '/config/app.test.toml', format: toml
});

// get date
nconf.get('date')
// toString, return `{}`
// should return Date Object, toString return time string.

fundon avatar Apr 05 '15 05:04 fundon

ping @jcrugzz

fundon avatar Apr 08 '15 23:04 fundon

This feels like it may be bug in the toml library you are using. We'll circle back on it.

indexzero avatar Sep 20 '15 08:09 indexzero