JSPM

rijs.versioned

0.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 7
  • Score
    100M100P100Q34178F
  • License pemrouz.mit-license.org

Package Exports

  • rijs.versioned

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (rijs.versioned) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Ripple | Versioned

Coverage Status Build Status

Adds versioning info and enables time travel, if there any resources being used which are versioned. This is achieved by materializing a list of indices of the individual versioned resources under ripple.versioned.log. A change in a versioned resource will create a new list of indicies. Rollbacking to a specfied time simply reregisters the snapshots of all the resources at that time.

ripple.version()   // get current HEAD
ripple.version(10) // time travel to specified time, returns list of resources reset

You can also rollback individual resources:

ripple.version('foo')     // get current HEAD for resource
ripple.version('foo', 10) // rollback resource, returns resource reset

Negative numbers are interpreted as relative to the current index:

ripple.version(-1) // i.e. undo one step, HEAD~1