mirror of
https://github.com/shelljs/shelljs.git
synced 2026-01-18 16:03:37 +00:00
* chore: switch to eslint * fix: works on older versions of NodeJS now * chore: fix curly braces * chore: fix indents and remove jshint references
6 lines
135 B
JavaScript
6 lines
135 B
JavaScript
function _numLines(str) {
|
|
return typeof str === 'string' ? (str.match(/\n/g) || []).length + 1 : 0;
|
|
}
|
|
|
|
exports.numLines = _numLines;
|