# require-text

> require() text files

Latest version **0.0.1** (published 2014-08-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install require-text
pnpm add require-text
yarn add require-text
bun add require-text
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2014-08-20 |
| First published | 2014-08-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Vytautas Jakutis |
| Maintainers | jakutis |
| Keywords | require, module, file, text, txt, server-side, node, text, files, css, html, csv, tpl, tmpl, template |

## Links

- npm: https://www.npmjs.com/package/require-text
- Repository: https://github.com/jakutis/require-text
- Issues: https://github.com/jakutis/require-text/issues
- npm.io page: https://npm.io/package/require-text

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 0.0.1 (latest) — 2014-08-20

## README

# require-text

require() text files

- [Overview](#overview)
- [Installation](#installation)
- [API](#api)
- [Development](#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](https://www.npmjs.org/package/require-text):

    $ npm install --save require-text

## API

```javascript
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`

---
_Source: https://npm.io/package/require-text · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
