This one is probably end up being a npm package on i's own.