korest

0.0.7 • Public • Published

Built with Grunt Build Status

Deps Status DevDeps Status Dependency Status

korest

Function for knockout.js to map plain object into knockout observable with bound REST actions. Similar to knockout.mapping, but it is more simple and lightweight.

API

ko.rest(obj, options) - wraps given plain JS object into object with knockout observable fields bound to REST actions. options:

  • url - specifies root url to REST resource.

Wrapper has the following methods.

  • unwrap():Object - unwraps to plain JS object.
  • update(obj):void - updates observable fields with values from given plain JS object.
  • fetch():promise - fetches latest version of object from server.

NPM version Bower version

NPM

/korest/

    Package Sidebar

    Install

    npm i korest

    Weekly Downloads

    1

    Version

    0.0.7

    License

    MIT

    Last publish

    Collaborators

    • sergeyt