Launch Week Day 2: Introducing Reports: An Extensible Reporting Framework for Socket Data.Learn More
Socket
Book a DemoSign in
Socket

ali-green-typescript-sdk

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ali-green-typescript-sdk

阿里云盾内容安全服务提供的内容检测 API SDK (TypeScript 版)

latest
Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
11
22.22%
Maintainers
1
Weekly downloads
 
Created
Source

ali-green-typescript-sdk

阿里云盾内容安全服务提供的内容检测 API SDK (TypeScript 版)

npm download NPM version Build Status Dependencies Status Coverage Status code style: prettier

安装

npm install ali-green-typescript-sdk --save

功能列表

  • 图片鉴黄 AliGreen.pornScan(['url1', 'url2', key, secret])
  • 文本垃圾内容检测 AliGreen.textScan(['text1', 'text2', key, secret])
import AliGreen from 'ali-green-typescript-sdk'
import assert = require('assert')

const res = await AliGreen.pornScan(
  ['https://img.alicdn.com/tfs/TB1k_g9l26H8KJjSspmXXb2WXXa-600-600.jpg'],
  'yourAccessKeyId',
  'yourAccessKeySecret',
)

assert.deepStrictEqual(res.data.data[0].results, [
  {
    label: 'porn',
    rate: 99.700005,
    scene: 'porn',
    suggestion: 'block',
  },
])

详细参见 官方 文档

开发

  • 修改代码后跑

    npm test
    

    确保测试通过。

  • git commit

  • npm version patch/minor/major

  • npm publish

发布日志

  • 1.1.0 文本垃圾内容检测
  • 1.0.0 图片鉴黄

FAQs

Package last updated on 27 Sep 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts