UNPKG

285 BJavaScriptView Raw
1var toString = require('../lang/toString');
2 /**
3 * Replaces hyphens with spaces. (only hyphens between word chars)
4 */
5 function unhyphenate(str){
6 str = toString(str);
7 return str.replace(/(\w)(-)(\w)/g, '$1 $3');
8 }
9 module.exports = unhyphenate;
10