auto-save

1.0.0 • Public • Published

auto-save

A simple timer wrapper that is useful for implementing a delayed autosave in text-based applications, like Google Docs.

Installation

Install with component(1):

$ component install bmcmahen/auto-save

API

// 500 represents the timeout duration in ms.
var autosave = require('auto-save')(500);
var txt = document.getElementByTagName('textarea')[0];
txt.oninput = function(){
  interval(function(){
    console.log('do some saving.');
  });
};

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    6
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    6

Package Sidebar

Install

npm i auto-save

Weekly Downloads

6

Version

1.0.0

License

MIT

Last publish

Collaborators

  • bmcmahen