## Usage ```js var rewrite = require('{%= name %}'); ``` Automatically re-write extensions to the mapped extensions from [ext-map][]: ```js console.log(rewrite('abc.coffee')); //=> 'abc.js' console.log(rewrite('abc.less')); //=> 'abc.css' ``` Explicitly pass an extension to use: ```js console.log(rewrite('foo/bar.txt', '.abc')); //=> 'foo/bar.abc' ``` ## More examples ```js rewrite('abc.styl'); //=> 'abc.css' rewrite('abc.sass'); //=> 'abc.css' rewrite('abc.scss'); //=> 'abc.css' rewrite('faux.css'); //=> 'faux.css' rewrite('abc.swig'); //=> 'abc.html' rewrite('abc.hbs'); //=> 'abc.html' rewrite('abc.md'); //=> 'abc.html' rewrite('abc.tmpl'); //=> 'abc.html' rewrite('faux.html'); //=> 'faux.html' rewrite('faux.coffee'); //=> 'faux.js' ```