move api to new version and add tests

Again, I have a question about standard in Node.JS. Is it the standard way to define constants in Node.JS?