julie-ng/standard-healthcheck

View on GitHub
healthcheck/util/is-secret.js

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
'use strict'

module.exports = function (varname) {
    const norm = varname.toUpperCase()
    return (norm.endsWith('_KEY') ||
        norm.endsWith('SECRET') ||
        norm.endsWith('PASSWORD') ||
        norm.endsWith('_PASS')
    )
}