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.
21 lines
496 B
21 lines
496 B
2 years ago
|
"use strict";
|
||
|
|
||
|
var fs = require('fs');
|
||
|
|
||
|
var cacheLoader = require('../cacheLoader');
|
||
|
|
||
|
module.exports = cacheLoader(function (bundle) {
|
||
|
return new Promise(function (resolve, reject) {
|
||
|
fs.readFile(__dirname + bundle, function (err, data) {
|
||
|
if (err) {
|
||
|
reject(err);
|
||
|
} else {
|
||
|
resolve(data.buffer);
|
||
|
}
|
||
|
});
|
||
|
}).then(function (data) {
|
||
|
return WebAssembly.instantiate(data);
|
||
|
}).then(function (wasmModule) {
|
||
|
return wasmModule.instance.exports;
|
||
|
});
|
||
|
});
|