Converted this to a npm package to be used in datacache project