Nominally Patriotic Meathead

    protoscop

    0.0.0 • Public • Published

    proto-context NPM version Build Status Dependency Status Coveralls Status

    Manage context with ease

    Usage

    var Context = require('proto-context');
    var ctx = {};
     
    ctx.value = 'first version';  // console.log(ctx.value) -> 'first version'
    ctx = Context.snapshot(ctx);
    ctx.value = 'second version'; // console.log(ctx.value) -> 'second version'
    ctx = Context.restore(ctx);
    console.log(ctx.value); // -> 'first version' 

    API

    Context.snapshot(ctx)

    Creates new Object and add it to ctx prototype.

    Context.restore(ctx)

    Removes created Object from prototype chain of ctx.

    Install

    npm i protoscop

    DownloadsWeekly Downloads

    2

    Version

    0.0.0

    License

    MIT

    Last publish

    Collaborators

    • floatdrop