Permalink
Browse files

Merge pull request #35 from flaki/master

Added ComputedPropertyNames feature
  • Loading branch information...
2 parents 72f22c2 + 31e40b1 commit 4b31e03ce6b3a5377191bf84dab7af8e42d01cef @lukehoban committed Mar 10, 2014
Showing with 9 additions and 7 deletions.
  1. +9 −7 README.md
View
16 README.md
@@ -84,15 +84,17 @@ Object literals are extended to support setting the prototype at construction, s
```JavaScript
var obj = {
- // __proto__
- __proto__: theProtoObj,
- // Shorthand for ‘handler: handler’
- handler,
- // Methods
- toString() {
+ // __proto__
+ __proto__: theProtoObj,
+ // Shorthand for ‘handler: handler’
+ handler,
+ // Methods
+ toString() {
// Super calls
return "d " + super.toString();
- }
+ },
+ // Computed (dynamic) property names
+ [ 'prop_' + (() => 42)() ]: 42
};
```

0 comments on commit 4b31e03

Please sign in to comment.