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 selective-undo-text with all npm packages installed. Try it out:

var selectiveUndoText = require("selective-undo-text")

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

selective-undo-text v0.2.0

A Selective Undo library for text editing

selective-undo-text

A Selective Undo library for text editing.

Demo

http://codepen.io/ktsn/pen/qZxdaY

Usage

import { Buffer } from 'selective-undo-text';

const buf = Buffer('Initial Text');

buf.addText(7, ' Input');
console.log(buf.text) // Initial Input Text

buf.removeText(0, 8);
console.log(buf.text); // Input Text

buf.undo(0);
console.log(buf.text); //  Text

License

MIT

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