Skip to content

Instantly share code, notes, and snippets.

View davis-lee's full-sized avatar
😇
I may be slow to respond.

davis-lee

😇
I may be slow to respond.
  • Shenzhen
View GitHub Profile
#!/usr/bin/env node
'use strict';
/* Our bread & butter -- replaces a sub-string with something else */
function _replace(str, start, end, replacement) {
return str.substr(0, start) + replacement + str.substr(end, str.length);
}
/* Replaces user mentions based on object from tweet.entities.user_mentions */