Skip to content

Commit

Permalink
0.2.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanve committed Mar 20, 2014
1 parent 5befb76 commit 65e704f
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 17 deletions.
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,21 @@

## API

### `eol.auto(text)`
- Normalize line endings in <var>text</var> for the current operating system
- <b>@return</b> string with line endings normalized to `\r\n` or `\n`

### `eol.crlf(text)`
- Normalize <var>text</var> to <b>CRLF</b> (Windows, DOS) line endings
- <b>@return</b> string
- Normalize line endings in <var>text</var> to <b>CRLF</b> (Windows, DOS)
- <b>@return</b> string with line endings normalized to `\r\n`

### `eol.lf(text)`
- Normalize <var>text</var> to <b>LF</b> (Unix, OS X) line endings
- <b>@return</b> string
- Normalize line endings in <var>text</var> to <b>LF</b> (Unix, OS X)
- <b>@return</b> string with line endings normalized to `\n`

### `eol.cr(text)`
- Normalize <var>text</var> to <b>CR</b> (Mac OS) line endings
- <b>@return</b> string
- Normalize line endings in <var>text</var> to <b>CR</b> (Mac OS)
- <b>@return</b> string with line endings normalized to `\r`

## License

Expand Down
12 changes: 7 additions & 5 deletions eol.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
/*!
* eol 0.1.0+201403121730
* eol 0.2.0+201403200220
* https://github.com/ryanve/eol
* MIT License (c) 2014 Ryan Van Etten
* MIT License, 2014 Ryan Van Etten
*/

(function(root, name, make) {
!function(root, name, make) {
if (typeof module != 'undefined' && module.exports) module.exports = make();
else root[name] = make();
}(this, 'eol', function() {
Expand All @@ -17,5 +16,8 @@
api['lf'] = converts('\n');
api['cr'] = converts('\r');
api['crlf'] = converts('\r\n');
api['auto'] = converts(
typeof process != 'undefined' && 'win32' === process.platform ? '\r\n' : '\n'
);
return api;
}));
});
6 changes: 3 additions & 3 deletions eol.min.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* eol 0.1.0+201403121730
* eol 0.2.0+201403200220
* https://github.com/ryanve/eol
* MIT License (c) 2014 Ryan Van Etten
* MIT License, 2014 Ryan Van Etten
*/
!function(a,b,c){"undefined"!=typeof module&&module.exports?module.exports=c():a[b]=c()}(this,"eol",function(){function a(a){return function(b){return b.replace(c,a)}}var b={},c=/\r\n|\r|\n/g;return b.lf=a("\n"),b.cr=a("\r"),b.crlf=a("\r\n"),b});
!function(a,b,c){"undefined"!=typeof module&&module.exports?module.exports=c():a[b]=c()}(this,"eol",function(){function a(a){return function(b){return b.replace(c,a)}}var b={},c=/\r\n|\r|\n/g;return b.lf=a("\n"),b.cr=a("\r"),b.crlf=a("\r\n"),b.auto=a("undefined"!=typeof process&&"win32"===process.platform?"\r\n":"\n"),b});
28 changes: 25 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "eol",
"description": "Newline character converter",
"version": "0.1.0",
"version": "0.2.0",
"homepage": "https://github.com/ryanve/eol",
"license": "MIT",
"author": "Ryan Van Etten",
Expand All @@ -13,10 +13,32 @@
},
"devDependencies": {
"aok": "~1.8.1",
"universal": "~0.0.2",
"grunt": "~0.4.2",
"universal": "~0.0.5",
"grunt": "~0.4.4",
"grunt-contrib-uglify": "~0.3.0",
"grunt-contrib-concat": "~0.3.0",
"grunt-contrib-jshint": "~0.8.0"
},
"jshintConfig": {
"boss": true,
"browser": true,
"debug": true,
"devel": true,
"eqnull": true,
"evil": true,
"expr": true,
"globals": {
"define": true,
"ender": true
},
"jquery": true,
"latedef": "nofunc",
"laxcomma": true,
"maxerr": 10,
"node": true,
"sub": true,
"supernew": true,
"undef": true,
"unused": true
}
}

0 comments on commit 65e704f

Please sign in to comment.