Sha256: 306284374e01fe7ca13e51d3711c093ce0e7f8b5fda614bb209157469690183a

Contents?: true

Size: 1.64 KB

Versions: 22

Compression:

Stored size: 1.64 KB

Contents

"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.transformFromAst = void 0;
exports.transformFromAstAsync = transformFromAstAsync;
exports.transformFromAstSync = transformFromAstSync;
function _gensync() {
  const data = require("gensync");
  _gensync = function () {
    return data;
  };
  return data;
}
var _index = require("./config/index.js");
var _index2 = require("./transformation/index.js");
var _rewriteStackTrace = require("./errors/rewrite-stack-trace.js");
const transformFromAstRunner = _gensync()(function* (ast, code, opts) {
  const config = yield* (0, _index.default)(opts);
  if (config === null) return null;
  if (!ast) throw new Error("No AST given");
  return yield* (0, _index2.run)(config, code, ast);
});
const transformFromAst = exports.transformFromAst = function transformFromAst(ast, code, optsOrCallback, maybeCallback) {
  let opts;
  let callback;
  if (typeof optsOrCallback === "function") {
    callback = optsOrCallback;
    opts = undefined;
  } else {
    opts = optsOrCallback;
    callback = maybeCallback;
  }
  if (callback === undefined) {
    {
      return (0, _rewriteStackTrace.beginHiddenCallStack)(transformFromAstRunner.sync)(ast, code, opts);
    }
  }
  (0, _rewriteStackTrace.beginHiddenCallStack)(transformFromAstRunner.errback)(ast, code, opts, callback);
};
function transformFromAstSync(...args) {
  return (0, _rewriteStackTrace.beginHiddenCallStack)(transformFromAstRunner.sync)(...args);
}
function transformFromAstAsync(...args) {
  return (0, _rewriteStackTrace.beginHiddenCallStack)(transformFromAstRunner.async)(...args);
}
0 && 0;

//# sourceMappingURL=transform-ast.js.map

Version data entries

22 entries across 15 versions & 2 rubygems

Version Path
immosquare-cleaner-0.1.51 node_modules/jscodeshift/node_modules/@babel/core/lib/transform-ast.js
immosquare-cleaner-0.1.51 node_modules/@babel/core/lib/transform-ast.js
immosquare-cleaner-0.1.50 node_modules/@babel/core/lib/transform-ast.js
immosquare-cleaner-0.1.50 node_modules/jscodeshift/node_modules/@babel/core/lib/transform-ast.js
immosquare-cleaner-0.1.49 node_modules/jscodeshift/node_modules/@babel/core/lib/transform-ast.js
immosquare-cleaner-0.1.49 node_modules/@babel/core/lib/transform-ast.js
immosquare-cleaner-0.1.48 node_modules/jscodeshift/node_modules/@babel/core/lib/transform-ast.js
immosquare-cleaner-0.1.48 node_modules/@babel/core/lib/transform-ast.js
immosquare-cleaner-0.1.47 node_modules/jscodeshift/node_modules/@babel/core/lib/transform-ast.js
immosquare-cleaner-0.1.47 node_modules/@babel/core/lib/transform-ast.js
immosquare-cleaner-0.1.46 node_modules/jscodeshift/node_modules/@babel/core/lib/transform-ast.js
immosquare-cleaner-0.1.46 node_modules/@babel/core/lib/transform-ast.js
immosquare-cleaner-0.1.45 node_modules/jscodeshift/node_modules/@babel/core/lib/transform-ast.js
immosquare-cleaner-0.1.45 node_modules/@babel/core/lib/transform-ast.js
immosquare-cleaner-0.1.44 node_modules/@babel/core/lib/transform-ast.js
immosquare-cleaner-0.1.43 node_modules/@babel/core/lib/transform-ast.js
immosquare-cleaner-0.1.42 node_modules/@babel/core/lib/transform-ast.js
immosquare-cleaner-0.1.41 node_modules/@babel/core/lib/transform-ast.js
immosquare-cleaner-0.1.40 node_modules/@babel/core/lib/transform-ast.js
wice_grid-7.1.0 node_modules/@babel/core/lib/transform-ast.js