Sha256: de1054e583dd6b9c4ac89f3d266f729d0e8fbf00a224268995a979a651854f07

Contents?: true

Size: 1.19 KB

Versions: 30

Compression:

Stored size: 1.19 KB

Contents

"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.transformAsync = exports.transformSync = exports.transform = void 0;

function _gensync() {
  const data = _interopRequireDefault(require("gensync"));

  _gensync = function () {
    return data;
  };

  return data;
}

var _config = _interopRequireDefault(require("./config"));

var _transformation = require("./transformation");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

const transformRunner = (0, _gensync().default)(function* transform(code, opts) {
  const config = yield* (0, _config.default)(opts);
  if (config === null) return null;
  return yield* (0, _transformation.run)(config, code);
});

const transform = function transform(code, opts, callback) {
  if (typeof opts === "function") {
    callback = opts;
    opts = undefined;
  }

  if (callback === undefined) return transformRunner.sync(code, opts);
  transformRunner.errback(code, opts, callback);
};

exports.transform = transform;
const transformSync = transformRunner.sync;
exports.transformSync = transformSync;
const transformAsync = transformRunner.async;
exports.transformAsync = transformAsync;

Version data entries

30 entries across 30 versions & 5 rubygems

Version Path
optimacms-0.1.61 spec/dummy/node_modules/@babel/core/lib/transform.js
trusty-cms-5.0.7 node_modules/@babel/core/lib/transform.js
trusty-cms-5.0.6 node_modules/@babel/core/lib/transform.js
trusty-cms-5.0.5 node_modules/@babel/core/lib/transform.js
trusty-cms-5.0.4 node_modules/@babel/core/lib/transform.js
trusty-cms-5.0.3 node_modules/@babel/core/lib/transform.js
trusty-cms-5.0.2 node_modules/@babel/core/lib/transform.js
trusty-cms-5.0.1 node_modules/@babel/core/lib/transform.js
trusty-cms-4.3.5 node_modules/@babel/core/lib/transform.js
trusty-cms-5.0.0 node_modules/@babel/core/lib/transform.js
trusty-cms-4.3.4 node_modules/@babel/core/lib/transform.js
trusty-cms-4.3.3 node_modules/@babel/core/lib/transform.js
trusty-cms-4.3.2 node_modules/@babel/core/lib/transform.js
trusty-cms-4.3.1 node_modules/@babel/core/lib/transform.js
trusty-cms-4.3 node_modules/@babel/core/lib/transform.js
trusty-cms-4.2.3 node_modules/@babel/core/lib/transform.js
tang-0.2.1 spec/tang_app/node_modules/@babel/core/lib/transform.js
trusty-cms-4.2.2 node_modules/@babel/core/lib/transform.js
trusty-cms-4.2.1 node_modules/@babel/core/lib/transform.js
trusty-cms-4.2 node_modules/@babel/core/lib/transform.js