I'm using CIDRs as config keys, and it makes less sense to use dotProp to set / get. I toyed with adding an option to specify whether to use dotProp or not, but in the end it was easier to add 2 new methods and use those to store plain strings with dots in the keys:
Configstore.prototype.setPlain = function (key, val) {
var config = this.all;
if (arguments.length === 1) {
Object.keys(key).forEach(function (k) {
config[k] = key[k];
});
} else {
config[key] = val;
}
this.all = config;
};
and its counterpart:
Configstore.prototype.getPlain = function (key) {
return this.all[key];
};
Might be useful to someone. I'm newish to github - should I fork the project, make the change and then create a pull request? Seems a lot of admin for 2 simple additions, but let me know..
Tx
I'm using CIDRs as config keys, and it makes less sense to use dotProp to set / get. I toyed with adding an option to specify whether to use dotProp or not, but in the end it was easier to add 2 new methods and use those to store plain strings with dots in the keys:
and its counterpart:
Might be useful to someone. I'm newish to github - should I fork the project, make the change and then create a pull request? Seems a lot of admin for 2 simple additions, but let me know..
Tx