UNPKG

stylelint

Version:

A mighty CSS linter that helps you avoid errors and enforce conventions.

11 lines (9 loc) 261 B
import { createHash } from 'node:crypto'; /** * hash the given string * @param {string} str the string to hash * @returns {string} the hash */ export default function hash(str) { return createHash('sha256').update(str).digest('base64url').slice(0, 10); }