Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

update-banner

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

update-banner

Add or update a banner in a string.

Source
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

update-banner NPM version

Add or update a banner in a string.

Install with npm

npm i update-banner --save

Usage

If the string has a banner already, it will be replaced with an updated one. If, the string does not have a banner one will be added.

var banner = require('update-banner');
var str = fs.readFileSync('index.js', 'utf8');
banner(str);

Pass a custom template and/or data:

var ctx = 'Copyright (c) 2015, Jon Schlinkert.';
banner('/* <%= copyright %> */\n', {copyright: ctx});
//=> '/* Copyright (c) 2015, Jon Schlinkert. */\n'

Run tests

Install dev dependencies:

npm i -d && npm test

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue

Author

Jon Schlinkert

License

Copyright (c) 2015-2015 Jon Schlinkert
Released under the MIT license

This file was generated by verb on February 20, 2015.

Keywords

banner

FAQs

Package last updated on 23 Feb 2015

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