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

Version Path
appmap-0.72.2 ./node_modules/data-urls/lib/utils.js
appmap-0.72.1 ./node_modules/data-urls/lib/utils.js
appmap-0.72.0 ./node_modules/data-urls/lib/utils.js
appmap-0.71.0 ./node_modules/data-urls/lib/utils.js
appmap-0.70.2 ./node_modules/data-urls/lib/utils.js
appmap-0.70.1 ./node_modules/data-urls/lib/utils.js
appmap-0.70.0 ./node_modules/data-urls/lib/utils.js
appmap-0.69.0 ./node_modules/data-urls/lib/utils.js
appmap-0.68.2 ./node_modules/data-urls/lib/utils.js
appmap-0.68.1 ./node_modules/data-urls/lib/utils.js
appmap-0.68.0 ./node_modules/data-urls/lib/utils.js
appmap-0.67.1 ./node_modules/data-urls/lib/utils.js
appmap-0.67.0 ./node_modules/data-urls/lib/utils.js
appmap-0.66.2 ./node_modules/data-urls/lib/utils.js
appmap-0.66.1 ./node_modules/data-urls/lib/utils.js
appmap-0.66.0 ./node_modules/data-urls/lib/utils.js
appmap-0.65.1 ./node_modules/data-urls/lib/utils.js
appmap-0.65.0 ./node_modules/data-urls/lib/utils.js
appmap-0.64.0 ./node_modules/data-urls/lib/utils.js
appmap-0.63.0 ./node_modules/data-urls/lib/utils.js