Skip to content
JS
Package

safe-compare

Constant-time comparison algorithm to prevent timing attacks.

v1.1.4, 1 Mar 2019MITCommonJSTypes: NoneNode.js utilities
$ npm install safe-compare

Key numbers

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

Downloads

Last week 2026-09-15 to 2026-09-21
0500k1m1.5m2mSept 2025Mar 2026Sept 2026High 1.5m (24 Mar 2026)Low 140.9k (30 Dec 2025)
Weekly npm downloads, one point per week, weeks starting 23 Sept 2025 to 15 Sept 2026. The y axis starts at zero.

308,635 downloads last week, 2,188,226 in the last month. The 12-month change of +168% compares the average of the last 4 weeks with the first 4 weeks of the series.

Releases, last 12 months
09 in total
Latest version
1.1.4, 1 Mar 20197 years ago
First published
24 Feb 2016
Last push to GitHub
14 Dec 20231,015 days before the snapshot
Repository archived
No
Open issues
0
Open pull requests
2
Commits, last 52 weeks
0
Dependents on npm
68

Major versions

  1. v1 first release 1.0.0, 24 Feb 2016

Recent releases

VersionPublished
1.1.41 Mar 2019
1.1.32 Nov 2018
1.1.228 Feb 2018
1.1.111 Feb 2018
1.1.017 Nov 2017
1.0.312 Jul 2016
1.0.215 Mar 2016
1.0.124 Feb 2016
1.0.024 Feb 2016
Module format
CommonJSFrom package.json type, main and exports fields
TypeScript types
None
Node.js engine range
Not declared
Runtimes
-
Unpacked size (npm)
8.7 kB
Dependencies (1)
buffer-alloc
npm install safe-compare
  • jsDelivrhttps://cdn.jsdelivr.net/npm/safe-compare@1.1.4/
  • unpkghttps://unpkg.com/safe-compare@1.1.4/
  • esm.shhttps://esm.sh/safe-compare@1.1.4
Sources: npm registry, npm downloads API, GitHub API. Data fetched 25 Sept 2026.

Indexability: Indexed.