The main export is a function that takes a string as the only argument. To ensure correct results, don't pass a string with whitespace.
const detect = require('{%= name %}');
console.log(detect('foo')); // lowercase
console.log(detect('FOO')); // uppercase
console.log(detect('Foo')); // titlecase
console.log(detect('FooBar')); // pascalcase
console.log(detect('fooBar')); // camelcase
console.log(detect('foo_bar')); // snakecase
console.log(detect('FOO_BAR')); // uppersnake
console.log(detect('1223344')); // unknown