-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
These features can be important for our project on ECMA6. It could be really useful to develop a short work on the features, usage and how impact on JS.
- Proxying
Info at: http://es6-features.org/#Proxying
let target = {
foo: "Welcome, foo"
}
let proxy = new Proxy(target, {
get (receiver, name) {
return name in receiver ? receiver[name] : `Hello, ${name}`
}
})
proxy.foo === "Welcome, foo"
proxy.world === "Hello, world"
- Reflection
More info at: http://es6-features.org/#Reflection
let obj = { a: 1 }
Object.defineProperty(obj, "b", { value: 2 })
obj[Symbol("c")] = 3
Reflect.ownKeys(obj) // [ "a", "b", Symbol(c) ]
Reactions are currently unavailable