Son CV dans un terminal web en Javascript!
https://terminal-cv.gregandev.fr
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.0 KiB
42 lines
1.0 KiB
"use strict";
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.transformSync = exports.transformAsync = exports.transform = void 0;
|
|
|
|
function _gensync() {
|
|
const data = require("gensync");
|
|
|
|
_gensync = function () {
|
|
return data;
|
|
};
|
|
|
|
return data;
|
|
}
|
|
|
|
var _config = require("./config");
|
|
|
|
var _transformation = require("./transformation");
|
|
|
|
const transformRunner = _gensync()(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; |