Skip to content
JS
Package

optional

Allows you to optionally include modules without surrounding everything with 'try/catch'

v0.1.4, 13 Jul 2017MITCommonJSTypes: None
$ npm install optional

Key numbers

As of 25 Sept 2026
Weekly downloads
324.3k
+19% over 12 months
Gzip bundle size
-
No Bundlephobia data
Dependencies
0
Direct, from package.json
Last release
9 years ago
v0.1.4
GitHub stars
-
Open issues / PRs
- / -
Contributors
-
Commits, last 52 weeks
-

Downloads

Last week 2026-09-15 to 2026-09-21
0200k400k600kSept 2025Mar 2026Sept 2026High 580.5k (12 May 2026)Low 192.9k (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.

324,255 downloads last week, 1,664,562 in the last month. The 12-month change of +19% compares the average of the last 4 weeks with the first 4 weeks of the series.

Releases, last 12 months
05 in total
Latest version
0.1.4, 13 Jul 20179 years ago
First published
18 Jan 2013
Last push to GitHub
-
Repository archived
-
Open issues
-
Open pull requests
-
Commits, last 52 weeks
-
Dependents on npm
-

Major versions

  1. v0 first release 0.1.0, 28 Sept 2014

Recent releases

VersionPublished
0.1.413 Jul 2017
0.1.326 Feb 2015
0.1.210 Dec 2014
0.1.19 Dec 2014
0.1.028 Sept 2014
Module format
CommonJSFrom package.json type, main and exports fields
TypeScript types
None
Node.js engine range
Not declared
Runtimes
-
Unpacked size (npm)
-
Dependencies (0)
None
npm install optional
  • jsDelivrhttps://cdn.jsdelivr.net/npm/optional@0.1.4/
  • unpkghttps://unpkg.com/optional@0.1.4/
  • esm.shhttps://esm.sh/optional@0.1.4
Sources: npm registry, npm downloads API. Data fetched 25 Sept 2026.

Indexability: Not indexed (discovery only): GitHub data not fetched yet; no category.