summaryrefslogtreecommitdiff
path: root/deps/npm/lib/utils/package-integrity.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/lib/utils/package-integrity.js')
-rw-r--r--deps/npm/lib/utils/package-integrity.js21
1 files changed, 0 insertions, 21 deletions
diff --git a/deps/npm/lib/utils/package-integrity.js b/deps/npm/lib/utils/package-integrity.js
deleted file mode 100644
index f9560d660e..0000000000
--- a/deps/npm/lib/utils/package-integrity.js
+++ /dev/null
@@ -1,21 +0,0 @@
-'use strict'
-
-// Utilities for generating and verifying the packageIntegrity field for
-// package-lock
-//
-// Spec: https://github.com/npm/npm/pull/16441
-
-const ssri = require('ssri')
-const SSRI_OPTS = {
- algorithms: ['sha512']
-}
-
-module.exports.check = check
-function check (pkg, integrity) {
- return ssri.checkData(JSON.stringify(pkg), integrity, SSRI_OPTS)
-}
-
-module.exports.hash = hash
-function hash (pkg) {
- return ssri.fromData(JSON.stringify(pkg), SSRI_OPTS).toString()
-}