Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including exdb with all npm packages installed. Try it out:

try { var exdb = require('.'); } catch(e) { var exdb = require('exdb'); } var plugin = null; // {get(), save()} var db = exdb(plugin); var data = db.data; db.data = {Sheet1: [1,2,3]}; db.save(); var db2 = exdb(plugin); db2.get(); console.log(typeof db2.data); db2.data.Sheet1.push(5); db2.save(); var db3 = exdb(plugin); db3.get(); console.log(db3.data); // Plugins console.log('**** plugin'); function g(){ console.log('getting ' + JSON.stringify(this.data)); } function s(){ console.log('saving ' + JSON.stringify(this.data)); } var plugin = {get: g, save: s}; var db4 = exdb(plugin); db4.data = {d: 4}; db4.get(); db4.save(); console.log(db4);

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

exdb v0.0.1

JS data saving

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free