Skip to content

Instantly share code, notes, and snippets.

@zzbo
Last active December 15, 2015 04:26
Show Gist options
  • Save zzbo/9ce34f5634d348d8cbb7 to your computer and use it in GitHub Desktop.
Save zzbo/9ce34f5634d348d8cbb7 to your computer and use it in GitHub Desktop.
简易dos文件格式转unix
//简易dos文件格式转unix
module.exports = function(str){
return str.replace(/(?:\r(\n)|\^M$|\x0D$)/g, '$1');
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment