]> git.kianting.info Git - clo/commitdiff
change .gitignore
authorTan Kian-ting <chenjt30@gmail.com>
Mon, 4 Sep 2023 13:33:39 +0000 (21:33 +0800)
committerTan Kian-ting <chenjt30@gmail.com>
Mon, 4 Sep 2023 13:33:39 +0000 (21:33 +0800)
.gitignore
src/harfbuzz.js
src/harfbuzz.ts
tests/index.js

index 3c3629e647f5ddf82548912e337bea9826b434af..7a3d9f033a75794c8340551894b6ec86575d4bf4 100644 (file)
@@ -1 +1,2 @@
 node_modules
+.js
\ No newline at end of file
index 18b19b175a964e03d6e18eaeeacbbb28d984fabb..7b9fa59d2ef4848ee5388dc3fddd4683d3b3edfb 100644 (file)
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
 exports.harfbuzzTest = void 0;
 var hb = require('harfbuzzjs/hbjs');
 var fs = require('fs');
+// some part of code derived from that by Ebrahim Byagowi,
+// under MIT License
 function harfbuzzTest(inputString) {
     WebAssembly.instantiate(fs.readFileSync(__dirname + "/../3rdparty/harfbuzzjs/hb.wasm"))
         .then(function (wsm) {
index 437558d4af75b493c9ee4ee1f197ca0772fc62e9..c7be4f0b230fb0bf6782a275b84fe84a6ac09f63 100644 (file)
@@ -1,6 +1,7 @@
 var hb = require('harfbuzzjs/hbjs');
 var fs = require('fs');
-
+// some part of code derived from that by Ebrahim Byagowi,
+// under MIT License
 export function harfbuzzTest(inputString: string){
     WebAssembly.instantiate(fs.readFileSync(__dirname+"/../3rdparty/harfbuzzjs/hb.wasm"))
         .then(function (wsm) {
index fa240b9b56231046a3dd3bcfa5988dd6aadd96c8..933dfccd53ed98619f7e6d64f51dc39e86d0691a 100644 (file)
@@ -1,28 +1,29 @@
-var assert = require("assert");
-var cloMain = require("../src");
-var a = cloMain.match1Char("我");
-var example1 = a({ matched: "", remained: "我的" });
+"use strict";
+let assert = require("assert");
+let cloMain = require("../src");
+let a = cloMain.match1Char("我");
+let example1 = a({ matched: "", remained: "我的" });
 assert(example1._tag == "Some");
 assert(example1.value.matched == "我");
 assert(example1.value.remained == "的");
-var example2 = a({ matched: "", remained: "妳的" });
+let example2 = a({ matched: "", remained: "妳的" });
 assert(example2._tag == "None");
-var thenDo = cloMain.thenDo;
+let thenDo = cloMain.thenDo;
 // composed part x
-var compPart1 = cloMain.match1Char("我");
-var compPart2 = cloMain.match1Char("的");
-var doThenTestee1 = { _tag: "Some", value: { matched: "", remained: "我的貓" } };
-var doTestRes1 = thenDo(thenDo(doThenTestee1, compPart1), compPart2);
+let compPart1 = cloMain.match1Char("我");
+let compPart2 = cloMain.match1Char("的");
+let doThenTestee1 = { _tag: "Some", value: { matched: "", remained: "我的貓" } };
+let doTestRes1 = thenDo(thenDo(doThenTestee1, compPart1), compPart2);
 assert(doTestRes1._tag == "Some");
 assert(doTestRes1.value.matched == "我的");
 assert(doTestRes1.value.remained == "貓");
-var doThenTestee2 = { _tag: "Some", value: { matched: "", remained: "我們" } };
-var doTestRes2 = thenDo(thenDo(doThenTestee2, compPart1), compPart2);
+let doThenTestee2 = { _tag: "Some", value: { matched: "", remained: "我們" } };
+let doTestRes2 = thenDo(thenDo(doThenTestee2, compPart1), compPart2);
 assert(doTestRes2._tag == "None");
 // harfbuzz test
-var harfbuzz = require("../src/harfbuzz.js");
+let harfbuzz = require("../src/harfbuzz.js");
 harfbuzz.harfbuzzTest("123.abc");
 // pdf test
-var pdfManipulate = require("../src/pdfManipulate.js");
+let pdfManipulate = require("../src/pdfManipulate.js");
 pdfManipulate.pdfGenerate("123.abc");
 console.log("/tmp/test.pdf產出ah");