Sha256: 4c18a66e5fb5a9ef3098f6cd923c10c3a6892fa3d26f70af3cacd35e8caed4b8

Contents?: true

Size: 1.22 KB

Versions: 98

Compression:

Stored size: 1.22 KB

Contents

"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.clear = clear;
exports.clearPath = clearPath;
exports.clearScope = clearScope;
exports.getCachedPaths = getCachedPaths;
exports.getOrCreateCachedPaths = getOrCreateCachedPaths;
exports.scope = exports.path = void 0;
let pathsCache = exports.path = new WeakMap();
let scope = exports.scope = new WeakMap();
function clear() {
  clearPath();
  clearScope();
}
function clearPath() {
  exports.path = pathsCache = new WeakMap();
}
function clearScope() {
  exports.scope = scope = new WeakMap();
}
const nullHub = Object.freeze({});
function getCachedPaths(hub, parent) {
  var _pathsCache$get, _hub;
  {
    hub = null;
  }
  return (_pathsCache$get = pathsCache.get((_hub = hub) != null ? _hub : nullHub)) == null ? void 0 : _pathsCache$get.get(parent);
}
function getOrCreateCachedPaths(hub, parent) {
  var _hub2, _hub3;
  {
    hub = null;
  }
  let parents = pathsCache.get((_hub2 = hub) != null ? _hub2 : nullHub);
  if (!parents) pathsCache.set((_hub3 = hub) != null ? _hub3 : nullHub, parents = new WeakMap());
  let paths = parents.get(parent);
  if (!paths) parents.set(parent, paths = new Map());
  return paths;
}

//# sourceMappingURL=cache.js.map

Version data entries

98 entries across 15 versions & 2 rubygems

Version Path
immosquare-cleaner-0.1.51 node_modules/@babel/plugin-transform-modules-systemjs/node_modules/@babel/traverse/lib/cache.js
immosquare-cleaner-0.1.51 node_modules/@babel/helper-skip-transparent-expression-wrappers/node_modules/@babel/traverse/lib/cache.js
immosquare-cleaner-0.1.51 node_modules/@babel/plugin-transform-function-name/node_modules/@babel/traverse/lib/cache.js
immosquare-cleaner-0.1.51 node_modules/jscodeshift/node_modules/@babel/core/node_modules/@babel/traverse/lib/cache.js
immosquare-cleaner-0.1.51 node_modules/@babel/plugin-transform-async-generator-functions/node_modules/@babel/traverse/lib/cache.js
immosquare-cleaner-0.1.51 node_modules/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/node_modules/@babel/traverse/lib/cache.js
immosquare-cleaner-0.1.51 node_modules/@babel/helper-wrap-function/node_modules/@babel/traverse/lib/cache.js
immosquare-cleaner-0.1.51 node_modules/@babel/plugin-transform-classes/node_modules/@babel/traverse/lib/cache.js
immosquare-cleaner-0.1.51 node_modules/@babel/plugin-transform-object-super/node_modules/@babel/helper-replace-supers/node_modules/@babel/traverse/lib/cache.js
immosquare-cleaner-0.1.51 node_modules/@babel/traverse/lib/cache.js
immosquare-cleaner-0.1.51 node_modules/@babel/helper-builder-binary-assignment-operator-visitor/node_modules/@babel/traverse/lib/cache.js
immosquare-cleaner-0.1.51 node_modules/@babel/helper-remap-async-to-generator/node_modules/@babel/traverse/lib/cache.js
immosquare-cleaner-0.1.51 node_modules/@babel/helper-module-imports/node_modules/@babel/traverse/lib/cache.js
immosquare-cleaner-0.1.51 node_modules/@babel/helper-member-expression-to-functions/node_modules/@babel/traverse/lib/cache.js
immosquare-cleaner-0.1.51 node_modules/@babel/helper-simple-access/node_modules/@babel/traverse/lib/cache.js
immosquare-cleaner-0.1.50 node_modules/@babel/helper-member-expression-to-functions/node_modules/@babel/traverse/lib/cache.js
immosquare-cleaner-0.1.50 node_modules/@babel/helper-module-imports/node_modules/@babel/traverse/lib/cache.js
immosquare-cleaner-0.1.50 node_modules/@babel/traverse/lib/cache.js
immosquare-cleaner-0.1.50 node_modules/@babel/plugin-transform-modules-systemjs/node_modules/@babel/traverse/lib/cache.js
immosquare-cleaner-0.1.50 node_modules/@babel/plugin-transform-classes/node_modules/@babel/traverse/lib/cache.js