Comparing version 0.6.0 to 0.7.0
@@ -37,2 +37,8 @@ declare module eol { | ||
export function after(text: string): string; | ||
/** | ||
* Split text by newline | ||
* @return array of lines | ||
*/ | ||
export function split(text: string): Array<string>; | ||
} | ||
@@ -39,0 +45,0 @@ |
@@ -25,2 +25,6 @@ !function(root, name, make) { | ||
function split(text) { | ||
return text.split(newline) | ||
} | ||
api['lf'] = converts('\n') | ||
@@ -32,3 +36,4 @@ api['cr'] = converts('\r') | ||
api['after'] = after | ||
api['split'] = split | ||
return api | ||
}); |
{ | ||
"name": "eol", | ||
"description": "Newline character converter", | ||
"version": "0.6.0", | ||
"version": "0.7.0", | ||
"homepage": "https://github.com/ryanve/eol", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
@@ -38,3 +38,7 @@ # eol | ||
### `eol.split(text)` | ||
- Split <var>text</var> by newline | ||
- <b>@return</b> array of lines | ||
## License | ||
MIT |
@@ -26,2 +26,7 @@ !function(root) { | ||
aok('crlf repeat newlines intact', eol.crlf('\r\n\r\n') === '\r\n\r\n') | ||
aok('split return type', eol.split('0\n1\n2') instanceof Array) | ||
aok('split lf', eol.split('0\n1\n2').join('') === '012') | ||
aok('split cr', eol.split('0\r1\r2').join('') === '012') | ||
aok('split crlf', eol.split('0\r\n1\r\n2').join('') === '012') | ||
aok('split mixed', eol.split('0\r\n1\n2\r3\r\n4').join('') === '01234') | ||
@@ -28,0 +33,0 @@ aok.pass(meths, function(method, i) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11174
191
44