Skip to content
JS
Package

file-contents

Set the `contents` property on a file object. Abstraction from vinyl-fs to support stream or non-stream usage.

v1.0.1, 3 Feb 2017MITCommonJSTypes: NoneFiles and file systems
$ npm install file-contents

Key numbers

As of 25 Sept 2026
Weekly downloads
80.5k
+4% over 12 months
Gzip bundle size
-
No Bundlephobia data
Dependencies
8
Direct, from package.json
Last release
9 years ago
v1.0.1
GitHub stars
8
0 forks
Open issues / PRs
2 / 1
Contributors
-
Commits, last 52 weeks
0

Downloads

Last week 2026-09-15 to 2026-09-21
050k100k150k200kSept 2025Mar 2026Sept 2026High 163.2k (17 Mar 2026)Low 47.4k (23 Dec 2025)
Weekly npm downloads, one point per week, weeks starting 23 Sept 2025 to 15 Sept 2026. The y axis starts at zero.

80,524 downloads last week, 390,932 in the last month. The 12-month change of +4% compares the average of the last 4 weeks with the first 4 weeks of the series.

Releases, last 12 months
-
Latest version
1.0.1, 3 Feb 20179 years ago
First published
-
Last push to GitHub
1 Apr 20202,368 days before the snapshot
Repository archived
No
Open issues
2
Open pull requests
1
Commits, last 52 weeks
0
Dependents on npm
10

Major versions

-

Recent releases

-

Module format
CommonJSFrom package.json type, main and exports fields
TypeScript types
None
Node.js engine range
>=0.10.0
Runtimes
-
Unpacked size (npm)
-
Dependencies (8)
kind-ofthrough2is-bufferlazy-cacheextend-shallowdefine-propertystrip-bom-bufferstrip-bom-string
npm install file-contents
  • jsDelivrhttps://cdn.jsdelivr.net/npm/file-contents@1.0.1/
  • unpkghttps://unpkg.com/file-contents@1.0.1/
  • esm.shhttps://esm.sh/file-contents@1.0.1
Sources: npm registry, npm downloads API, GitHub API. Data fetched 25 Sept 2026.

Indexability: Indexed.