function notValid(prop) {
    // guard against polluting __proto__ and other internals getters and setters
    return prop.slice(0, 2) === '__';
}
Iterate through an object in-place, converting dotted properties to objects.

Examples:

  lib.expandObjectPaths({'nested.test.path': 'value'});
    => { nested: { test: {path: 'value'}}}

It also handles array notation, e.g.:

  lib.expandObjectPaths({'foo[1].bar': 'value'});
    => { foo: [null, {bar: value}] }

It handles merges the results when two properties are specified in parallel:

  lib.expandObjectPaths({'foo[1].bar': 10, 'foo[0].bar': 20});
    => { foo: [{bar: 10}, {bar: 20}] }

It does NOT, however, merge multiple multiply-nested arrays::

  lib.expandObjectPaths({'marker[1].range[1]': 5, 'marker[1].range[0]': 4})
    => { marker: [null, {range: 4}] }