Webassembly 기본

This commit is contained in:
freestrings
2019-03-03 00:33:27 +09:00
parent 7bf3bb59b0
commit 9c0d2f8689
41 changed files with 5949 additions and 38 deletions

16
wasm/www/index.js Normal file
View File

@ -0,0 +1,16 @@
import * as jsonpath from "rs-jsonpath";
let jsonString = "{\"a\" : 1}";
let template = jsonpath.compile("$.a");
console.log(template(jsonString));
console.log(template(JSON.parse(jsonString)));
let reader1 = jsonpath.reader(jsonString);
console.log(reader1("$.a"));
let reader2 = jsonpath.reader(JSON.parse(jsonString));
console.log(reader2("$.a"));
console.log(jsonpath.read(JSON.parse(jsonString), "$.a"));
console.log(jsonpath.read(jsonString, "$.a"));