/
githubmirror
/
gutenberg
Обзор
Документация
Войти
/
githubmirror
/
gutenberg
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
packages/env/lib/md5.js
15 строк
444 B
Marco Ciampini
ESLint: Replace strict config with bulk suppressions (#81248)
07 авг 2026, 14:34
Не верифицирован
07 авг 2026, 14:34
7f43eaf
Код
Авторство
О чём код?
'use strict'; const crypto = require( 'crypto' ); /** * Hashes the given string using the MD5 algorithm. * * @param {any} data The data to hash. If not a string, converted with JSON.stringify. * @return {string} An MD5 hash string. */ module.exports = function md5( data ) { const convertedData = typeof data === 'string' ? data : JSON.stringify( data ); return crypto.createHash( 'md5' ).update( convertedData ).digest( 'hex' ); };