</>PackageGraphPackageGraph

require-from-string

npmv2.0.2

Require module from string

Not recommended for new projects

No — require-from-string should not be adopted for new projects. Last published 3075 days ago.

  • AAdoption: grade A, Excellent.

    120.1M downloads per week and 3 known dependents.

  • FMaintenance: grade F, Failing.

    Last published 3075 days ago.

  • AWeight: grade A, Excellent.

    Zero runtime dependencies, about 3.3 KB installed.

  • BSupply chain: grade B, Good.

    This package has a single maintainer (bus factor of 1).

  • ALicense: grade A, Excellent.

    MIT — permissive, with no copyleft found in the dependency tree.

Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.

Install cost

What you actually take on by adding require-from-string to a project.

0
Direct dependencies

Runtime packages this one declares itself.

0
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

3.3 KB
Install size

Unpacked size of this package plus its entire runtime tree.

Tree depth

Longest resolved dependency chain below this package.

Compatibility

Node.js
node >=0.10.0
Module format
CommonJS only
TypeScript
No bundled types
Install scripts
None

Quick start

A usage example from the require-from-string README.

var requireFromString = require('require-from-string');

requireFromString('module.exports = 1');
//=> 1

Dependencies

Declared by require-from-string v2.0.2. Runtime dependencies are installed with the package; dev dependencies are not.

Dev (1)

mocha *

Used by

Popular packages that depend on require-from-string.

Relationship graph

Dependencies (left) and dependents (right) of require-from-string.

bidi-js@fastify/ajv-comp…@expo/fingerprintrequire-from-stri…
require-from-string dependencies dependents

Frequently installed together

Release history

No releases in the last two years, typically about 151 days apart.

Recent versions of require-from-string
VersionPublishedSizeLicense
2.0.2latest8 years ago3.3 KBMIT
2.0.19 years agoMIT
2.0.09 years agoMIT
1.2.110 years agoMIT
1.2.010 years agoMIT
1.1.010 years agoMIT
1.0.211 years agoMIT
1.0.111 years agoMIT
1.0.011 years agoMIT

Overview

require-from-string is an npm package that require module from string. It is extremely widely used, with about 120.1M downloads per week and 3 known dependents in the graph. The latest version is 2.0.2, released under the MIT license.

Who should use it

Teams working in the npm ecosystem who need require module from string and value a battle-tested, widely-adopted solution.

When not to use it

Consider an alternative if you need to have first-class TypeScript types out of the box, or if a more actively-maintained option better fits your npm stack.

Pros

  • Large, well-established user base (120.1M weekly downloads).
  • Clear open-source license (MIT).
  • Lean dependency tree (1 direct dependencies).

Cons

  • No bundled TypeScript types (may require a separate @types package).

Auto-generated from collected registry metadata. No external claims are inferred.

Maintainers

Frequently asked questions

Should I use require-from-string?

No — require-from-string should not be adopted for new projects. Last published 3075 days ago.

How do I install require-from-string?

Run `npm install require-from-string` to add require-from-string to your npm project.

What license is require-from-string released under?

require-from-string is distributed under the MIT license.

How popular is require-from-string?

require-from-string has approximately 120,058,757 downloads per week and 3 known dependent packages.

Is require-from-string still maintained?

The most recent release of require-from-string (v2.0.2) was published 8 years ago.

Does require-from-string run install scripts?

No. require-from-string does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.