- string-lerp-1.0.0.tar.gz (16KB)
- npm install string-lerp
- git clone http://git.yukkurigames.com/string-lerp.git
Not really sure what that means? Try it out.
In a browser, use
In Node.js and other non-browser environments,
var stringLerp = require("./string-lerp")
var result = stringLerp.lerp(source, target, amount); // `source' is the string to start with // `target' is the string to finish with // `amount' is an amount to edit the strings, between 0 and 1, // e.g. 0.23 = 23% from source to target
are also exposed, as
diffLerp is too slow for
very long strings unless you compute and store the diff list
ahead of time.