Make it can be run on Node

Make it can be used on both browser side and Nodejs