🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

require-text

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

require-text

require() text files

latest
Source
npmnpm
Version
0.0.1
Version published
Weekly downloads
5.6K
1.15%
Maintainers
1
Weekly downloads
 
Created
Source

require-text

require() text files

  • Overview
  • Installation
  • API
  • Development

Overview

  • Useful in Node.JS environment, which can only require .js, .json and .node files.
  • Resolves and loads the file from filename just like the standard Node.JS require - does relative path resolution, etc.

Installation

Install with npm:

$ npm install --save require-text

API

var requireText = require('require-text');

var index = requireText('./index.html', require);
// Prints contents of ./index.html file, which resides
// in the same directory as this source code file.
console.log(index);

Development

Checklist before releasing

  • package.json version number bumped
  • release X.X.X commit created and tagged as X.X.X
  • npm publish

Keywords

require

FAQs

Package last updated on 20 Aug 2014

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