options.js icon indicating copy to clipboard operation
options.js copied to clipboard

Add method to copy all options.

Open shaharmor opened this issue 10 years ago • 0 comments

Hi,

Today, in order to get a copy of the options value object you need to do something like this:

var option = new Options({a: true, b: false});
var obj = option.copy(Object.keys(option.value));

which is obviously not that convenient.

I think the best approach will be to have .copy() return all options like so:

var option = new Options({a: true, b: false});
var obj = option.copy();

shaharmor avatar Jun 22 '15 16:06 shaharmor