This is an NPM module that wraps require with a WordPress Transients style API. It only deals with JSON, and will cache requests for a set amount of time.