Nondeterministic Programming Methodology
Get unlimited public & private packages + team-based management with npm Teams.Learn more »

strip-lines

1.0.1 • Public • Published

strip-lines

Remove n lines from the beginning of a string.

Build status js-standard-style

Installation

npm install strip-lines

Usage

var strip = require('strip-lines')
 
var str = 'foo\r\nbar\nbaz'
 
// remove the first 2 lines from `str`
console.log(strip(str, 2)) // => baz

API

The module exposes a single function which takes two arguments:

strip(string, lines)
  • string - The string that should be parsed
  • lines - The number of lines to remove from the beginning of the provided string

License

MIT

Install

npm i strip-lines

DownloadsWeekly Downloads

392

Version

1.0.1

License

MIT

Last publish

Collaborators

  • avatar