WXL
4 天以前 3bd962a6d7f61239c020e2dbbeb7341e5b842dd1
node_modules/webpack/lib/util/source.js
@@ -11,15 +11,16 @@
const equalityCache = new WeakMap();
/**
 * Checks whether source equal true, when both sources are equal.
 * @param {Source} a a source
 * @param {Source} b another source
 * @returns {boolean} true, when both sources are equal
 */
const _isSourceEqual = (a, b) => {
   // prefer .buffer(), it's called anyway during emit
   /** @type {Buffer|string} */
   /** @type {Buffer | string} */
   let aSource = typeof a.buffer === "function" ? a.buffer() : a.source();
   /** @type {Buffer|string} */
   /** @type {Buffer | string} */
   let bSource = typeof b.buffer === "function" ? b.buffer() : b.source();
   if (aSource === bSource) return true;
   if (typeof aSource === "string" && typeof bSource === "string") return false;
@@ -29,6 +30,7 @@
};
/**
 * Checks whether this object is source equal.
 * @param {Source} a a source
 * @param {Source} b another source
 * @returns {boolean} true, when both sources are equal