1. strip-shebang
Strip shebang (Example: #!/bin/sh) from a string
strip-shebang
Package: strip-shebang
Created by: sindresorhus
Last modified: Fri, 16 Jun 2023 22:41:02 GMT
Version: 2.0.0
License: MIT
Downloads: 318
Repository: https://github.com/sindresorhus/strip-shebang

Install

npm install strip-shebang
yarn add strip-shebang

strip-shebang

Strip shebang (Example: #!/bin/sh) from a string

Install

$ npm install strip-shebang

Usage

 import fs from 'node:fs';
import stripShebang from 'strip-shebang';

const string = fs.readFileSync('unicorns', 'utf8');
//=> #!/usr/bin/env node
//=> console.log('unicorns');

stripShebang(string);
//=>
//=> console.log('unicorns');

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code