Skip to content

Instantly share code, notes, and snippets.

View HDv2b's full-sized avatar

Hussein Duvigneau HDv2b

View GitHub Profile
@HDv2b
HDv2b / proxyFactory.js
Last active January 6, 2017 00:36
My original proxy experiment, made more useful by wrapping in a factory function.
"use strict";
class Fruit {
constructor(name){
this._name = name;
}
set name(name){
this._name = name;
}
@HDv2b
HDv2b / proxy.js
Last active December 17, 2016 20:12
Using Proxy and Reflect (ES6) to restrict insertion of objects into an Array - with test
"use strict";
class Fruit {
constructor(name){
this._name = name;
}
set name(name){
this._name = name;
}