UNPKG

@bearz/strings

Version:

A collection of string utilities to avoid extra allocations and enable case insensitivity comparisons.

18 lines (17 loc) 525 B
/** * The underscore module provides a function to convert a string to underscore case. * * @module */ import { underscore as og } from "@bearz/slices/underscore"; /** * Converts the string to underscore case, generally from camel or pascal * case identifiers. * @param value The value to convert. * @param options The underscore conversion options. * @returns The string in underscore case. */ export function underscore(value, options) { const r = og(value, options); return String.fromCodePoint(...r); }