Launch Week Day 2: Introducing Reports: An Extensible Reporting Framework for Socket Data.Learn More
Socket
Book a DemoSign in
Socket

file-firstline-replace

Package Overview
Dependencies
Maintainers
3
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

file-firstline-replace

Replace the first line of a file with something else.

latest
Source
npmnpm
Version
0.0.3
Version published
Weekly downloads
399
102.54%
Maintainers
3
Weekly downloads
 
Created
Source

file-firstline-replace

Replace the first line of a file with something else.

Use case

If you need to replace the first line in a file, this module will allow you to do that. Particularly built for CSVs, https://github.com/madwire-media/lets-make-csvs, but you can use it for anything.

Installation

npm install file-firstline-replace

Usage

var filename = "thing.csv"
var newHeader = `"foo","bar","baz","bang"`
replaceFirstLineOfFile(filename, newHeader, function(err) {
  if (err) throw err
  /* ... */
})

Keywords

file

FAQs

Package last updated on 11 Jul 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts