Skip to content

Symbols support

Compare
Choose a tag to compare
@koresar koresar released this 31 Jul 13:29
· 30 commits to master since this release

In this release descriptors can have Symbols as object keys in addition to the regular string keys.

const S = Symbol();
const Stamp = compose({properties: { [S]: 'foo' }});
Stamp.compose.properties[S] === 'foo';

const instance = Stamp();
instance[S] === 'foo';

Works for deep merged things too.