Terminology
Terminology 是一款英语语言浏览器——集词典、同义词词典和研究工具于一体。Protocol Launcher 允许您生成深度链接以在 Terminology 中查找单词和搜索。
使用方式
有两种使用此库的方式:
- 按需导入(On-Demand):从子路径导入支持 tree-shaking,保持较小的打包体积。
- 完整导入(Full Import):从根包导入更方便,但会包含所有应用模块。
生产构建建议选择按需导入;快速脚本或演示可以使用完整导入。
选择安装方式
按需加载
推荐使用。生产环境优化。
全量导入
使用便捷。适合快速脚本。
打开应用
ts
import { open } from 'protocol-launcher/terminology'
const url = open()查找单词
直接在 Terminology 中打开某个术语的详细查询页面。
ts
import { lookup } from 'protocol-launcher/terminology'
const url = lookup({
text: 'automation',
})搜索
直接在 Terminology 中打开单词搜索。
ts
import { search } from 'protocol-launcher/terminology'
const url = search({
q: 'protocol',
})