es6-complete

0.0.8 • Public • Published

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);

Readme

Keywords

Package Sidebar

Install

npm i es6-complete

Weekly Downloads

1

Version

0.0.8

License

Apache-2.0

Unpacked Size

17 kB

Total Files

9

Last publish

Collaborators

  • matt_that