Skip to content
JS
Package

optional-js

Optionals for JS - wrapper for possibly undefined values, inspired by Java Optional API

v2.3.0, 22 Jul 2020MITCommonJSTypes: Bundled
$ npm install optional-js

Key numbers

As of 25 Sept 2026
Weekly downloads
342.8k
+4% over 12 months
Gzip bundle size
-
No Bundlephobia data
Dependencies
0
Direct, from package.json
Last release
6 years ago
v2.3.0
GitHub stars
76
7 forks
Open issues / PRs
9 / 12
Contributors
-
Commits, last 52 weeks
0

Downloads

Last week 2026-09-15 to 2026-09-21
0200k400k600kSept 2025Mar 2026Sept 2026High 492.1k (25 Aug 2026)Low 203.3k (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.

342,808 downloads last week. 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
019 in total
Latest version
2.3.0, 22 Jul 20206 years ago
First published
17 Feb 2015
Last push to GitHub
22 Jun 20221,556 days before the snapshot
Repository archived
No
Open issues
9
Open pull requests
12
Commits, last 52 weeks
0
Dependents on npm
-

Major versions

  1. v2 first release 2.0.0, 21 Mar 2018
  2. v1 first release 1.0.1, 17 May 2015
  3. v0 first release 0.1.0, 17 Feb 2015

Recent releases

VersionPublished
2.3.022 Jul 2020
2.1.114 Apr 2019
2.1.014 Apr 2019
2.0.021 Mar 2018
1.3.121 Mar 2018
1.3.020 Mar 2018
1.2.11 Dec 2016
1.2.06 Oct 2016
1.1.222 Mar 2016
1.1.110 Feb 2016
1.0.117 May 2015
0.1.711 Mar 2015
0.1.610 Mar 2015
0.1.510 Mar 2015
Module format
CommonJSFrom package.json type, main and exports fields
TypeScript types
Bundled
Node.js engine range
Not declared
Runtimes
-
Unpacked size (npm)
37 kB
Dependencies (0)
None
npm install optional-js
  • jsDelivrhttps://cdn.jsdelivr.net/npm/optional-js@2.3.0/
  • unpkghttps://unpkg.com/optional-js@2.3.0/
  • esm.shhttps://esm.sh/optional-js@2.3.0
Sources: npm registry, npm downloads API, GitHub API. Data fetched 25 Sept 2026.

Indexability: Not indexed (discovery only): no category.