0.0.8 • Published 6 years ago

es6-complete v0.0.8

Weekly downloads
2
License
Apache-2.0
Repository
github
Last release
6 years ago

es6-complete

es6-complete is an NPM for protecting objects at runtime in ES6

NPM version

notes

  • clone
  • npm install
  • npm run test

use

use it to protect things like static object properties...

import complete from 'es6-complete';

export default class SomeObject {}
SomeObject.foo = 'foo';

complete(SomeObject);

// the foo property is immutable

... or, instances

import complete from 'es6-complete';

export default class SomeClass {
    constructor() {
        this.foo = 'foo';
        complete(this);
    }
}

... or, complete something at just the right time.. .

import complete from 'es6-complete';

const handler = (thing) => {
    complete(thing);
    // send it somewhere
};

let a = 'this';
a = 'that';
a = 'the other thing';
handler(a);
0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago