npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@tiog/ace

v1.0.7

Published

tig ace api

Readme

ACE内容安全过滤组件

安装:

// 内网安装
npm i @tencent/tig-ace

// 外网安装(适用于云函数自动安装依赖)
npm i @tiog/ace

文档

官网

接口文档

接口调用

1、初始化

const ace = new Ace('ace_ugc_326', 'xxxxxx');

const account: AccountInfo = {
  // 用户id
  account: '100086',
  // 用户昵称
  role_name: 'tianxia',
  // 平台id:无意义
  plat_id: 2,
};

2、批量文本安全检测

const res = await ace.checkBatchText([{
  // 场景id:用户信息场景为101
  scene_id: 101,
  text: '大**',
  account,
}]);
console.log(res);
// 打印:
{
  err_code: 0,
  err_msg: 'succ',
  data: [
    {
      err_code: 0,
      err_msg: ';Account[10086]',
      data_id: '',
      request_id: '1691403776-7953-5116675-4228905_326_10086',
      text_check_result: [Object]
    }
  ]
}

console.log(res.data?.[0].text_check_result);
// 打印:
{
  check_result: 1,
  filtered_text: '大**',
  label: 106,
  check_desc: '[Text] hit policy_model; '
}

3、批量图片检测

const res = await ace.checkBatchPicture([
  {
    scene_id: 103,
    url: 'https://tigimg-1252093452.image.myqcloud.com/2022/05/31/ZhRVYYJfLUQtmZxFTsXa.png',
    pic_type: 1,
    account,
  },
]);
console.log(res);
// 返回:
{
  err_code: 0,
  err_msg: 'succ',
  data: [
    {
      err_code: 0,
      err_msg: 'OK;Account[10086]',
      data_id: '',
      request_id: '1691404913-180-4408563-63900549_326_10086',
      label: 102,
      check_desc: '命中策略130065'
    }
  ]
}

4、文章内容检测

const result = await ace.checkArticle(
  3001,
  {
    id: '100086',
    title: '游戏开发方法论总结',
    description: '唱支山歌给党听',
    content: '游戏开发方法论总结',
    pictures: []
  },
  account,
);

console.log(result);
// 打印:
{
  err_code: 0,
  err_msg: 'succ',
  data: {
    request_id: '326_tianxia_1649220420714_61841514',
    text_check_result: {
      check_result: 2,
      filtered_text: '********',
      label: 101,
      check_desc: '[TongQue] hit comm_black'
    },
    pic_check_results: []
  }
}