代码拉取完成,页面将自动刷新
const importPath = import('path')
const importUtil = import('util')
const axeSoftFromFile = function() {
var pathDir = importPath.pathMetaBin()
var pathJson = '{}/package_source_data/{}'.format(pathDir, 'axe.json')
var s = stringFromFile(pathJson)
var j = json.loads(s)
return j
}
const search = function(name) {
const axe = axeSoftFromFile()
const searchNames = []
for (var i = 0; i < axe.length(); i += 1) {
const item = axe[i]
const itemName = item['name']
const type = item['type']
const score = importUtil.guaStringMatchScore(name, itemName)
if (score <= 0) {
continue
} else {
const version = item['version']
const _item = {
'name': itemName,
'version': version,
'token': itemName,
'score': score,
'type': type,
}
searchNames.add(_item)
}
}
const sortedNames = importUtil.guaListSortByKey(searchNames, 'score', reverse=true)
return sortedNames
}
const axeSoftFromName = function(name) {
const axe = axeSoftFromFile()
var i = 0
const l = axe.length()
while (i < l) {
const item = axe[i]
const itemName = item['name']
if (itemName.lower() == name.lower()) {
return item
}
i += 1
}
}
const tokenExist = function(token) {
const b = axeSoftFromName(token)
const e = b != null
return e
}
const install = function(command) {
return importUtil.callWithoutOutput(command)
}
const get = function(name) {
const axe = axeSoftFromName(name)
const command = axe['command']
return install(command)
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。