Sha256: 7c62d115477edd7c73c4ea257558dd6c138ffe221dc5b15a6674a6cfd765bb26
Contents?: true
Size: 579 Bytes
Versions: 23
Compression:
Stored size: 579 Bytes
Contents
"use strict"; const { percentDecode } = require("whatwg-url"); const { atob } = require("abab"); exports.stripLeadingAndTrailingASCIIWhitespace = string => { return string.replace(/^[ \t\n\f\r]+/, "").replace(/[ \t\n\f\r]+$/, ""); }; exports.stringPercentDecode = input => { return percentDecode(Buffer.from(input, "utf-8")); }; exports.isomorphicDecode = input => { return input.toString("binary"); }; exports.forgivingBase64Decode = data => { const asString = atob(data); if (asString === null) { return null; } return Buffer.from(asString, "binary"); };
Version data entries
23 entries across 22 versions & 2 rubygems