Commit 9f2eb347 authored by Jarrod's avatar Jarrod 💬

Update zhdict decomp dependency

parent 8784a834
......@@ -19,6 +19,6 @@ module.exports = {
LIMIT 1;`;
let result = await sails.sendNativeQuery(sql)
return result && result.rows && result.rows.length ? result.rows[0] : null
return result && result.rows && result.rows.length ? { idiom: result.rows[0] } : { idiom: null }
}
}
\ No newline at end of file
const util = require('util');
const decomp = require('@zhdict/zh-decomp');
const decomp = require('@nahanil/zh-decomp');
const getUnihan = util.promisify(require('cjk-unihan').get);
module.exports = {
......@@ -64,7 +64,7 @@ module.exports = {
radical: w[`radical${ucKey}`],
strokes: w[`strokes${ucKey}`],
strokesMinRad: w[`strokesMinRad${ucKey}`],
decomp: decomp.lookupNg(w[variant])
decomp: decomp.lookup(w[variant])
};
}
});
......
......@@ -14,7 +14,7 @@
"license": "ISC",
"dependencies": {
"@zhdict/tokenizer": "git+ssh://git@git.carrotlabs.net:zhdict/zhdict-tokenizer.git",
"@zhdict/zh-decomp": "git+ssh://git@git.carrotlabs.net:zhdict/zh-decomp.git",
"@nahanil/zh-decomp": "^0.2.0",
"chinese-conv": "^1.0.1",
"cjk-unihan": "0.0.2-a",
"hanzi-writer-data": "^2.0.1",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment