tahamajs's picture
download
raw
491 Bytes
const getAffix = (source, affix) => typeof affix === 'function' ? affix(source) : typeof affix === 'string' ? affix : '';
const htmlRegex = /^([^>]+>)([\s\S]+)(<[^<]+)$/i;
const getWrappedEntry = (value, source, {
prepend,
append
}) => {
const [, start = '', content = value, end = ''] = value.match(htmlRegex) || [];
const prefix = getAffix(source, prepend);
const suffix = getAffix(source, append);
return start + prefix + content + suffix + end;
};
export { getWrappedEntry };

Xet Storage Details

Size:
491 Bytes
·
Xet hash:
31892f22a09c25ffd8dee867213d2e78a24c86511b07bc5bf881e163e41762a0

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.