Helpers

emojiHash.mjs

@mr_ozio/scraper-utils · v2.5.0 · Generated April 21, 2026

Target Style

Target Style

1 exports

const

emojiHashOf

Target Style
export const emojiHashOf = (string, { length = 1 } = {}) => {

Turns a string into a stable emoji hash with named options.

Target style API. Preferred for new code.

Parameters

  • stringstring
  • [options]{ length?: number }

Returns

string

Legacy Style

Legacy Style

1 exports

const

emojiHash

Legacy Style
export const emojiHash = (string = undefined, hashLength = 1) => {

Turns a string into a stable emoji hash.

Legacy API. Kept for older code and not the preferred choice for new code.

Parameters

  • [string]string
  • [hashLength=1]number

Returns

string

Example

const badge = emojiHashOf('scraper-utils', {
  length: 2,
})