Current section

Files

Jump to
udia assets node_modules mout string unhyphenate.js
Raw

assets/node_modules/mout/string/unhyphenate.js

var toString = require('../lang/toString');
/**
* Replaces hyphens with spaces. (only hyphens between word chars)
*/
function unhyphenate(str){
str = toString(str);
return str.replace(/(\w)(-)(\w)/g, '$1 $3');
}
module.exports = unhyphenate;