UNPKG

@57block/stellar-resource-usage

Version:

A library that provides convenient ways to monitor and analyze the resources consumed by smart contracts during execution

20 lines (16 loc) 442 B
import trimmedEndIndex from './_trimmedEndIndex.js'; /** Used to match leading whitespace. */ var reTrimStart = /^\s+/; /** * The base implementation of `_.trim`. * * @private * @param {string} string The string to trim. * @returns {string} Returns the trimmed string. */ function baseTrim(string) { return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '') : string; } export default baseTrim;