New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@tng/gta

Package Overview
Dependencies
Maintainers
5
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tng/gta

TNG GTA 中间件 ==============

  • 1.0.0
  • npm
  • Socket score

Version published
Weekly downloads
3
increased by200%
Maintainers
5
Weekly downloads
 
Created
Source

TNG GTA 中间件

使用

yarn add @tng/gta
重写的request模块

用法一

const gta = require('@tng/gta').use('ga') // env: ga
// get方法
// @return promise
console.log(yield gta.get({ user: 'abc' }))  
// {body: {event: 1, statusCode: 200}}

// post方法
// @return promise
console.log(yield gta.post({ user: 'abc' }))
// {body: {event: 1, statusCode: 200}}

用法二

const gta = require('@tng/gta')
// note: options 参考 request模块
const options = { url: 'https://gta.teambition.net/v1/track/' }

// get方法
// @return promise
console.log(yield gta.get({ user: 'abc' }, options))
// {body: {event: 1, statusCode: 200}}

// post方法
// @return promise
console.log(yield gta.post({ user: 'abc' }, options))
// {body: {event: 1, statusCode: 200}}

用法三

const { Gta } = require('@tng/gta')
const gta = new Gta({url:'https://gta.teambition.net/v1/track/'})

// get方法
// @return promise
console.log(yield gta.get({ user: 'abc' }))  
// {body: {event: 1, statusCode: 200}}

// post方法
// @return promise
console.log(yield gta.post({ user: 'abc' }))
// {body: {event: 1, statusCode: 200}}

env

{
  "local": "http://localhost:8082/v1/track",
  "21": "http://gta.dev22/v1/track/",
  "ga": "https://gta.teambition.net/v1/track/",
  "release": "https://gta.teambition.net/v1/track/"
}

FAQs

Package last updated on 06 Jul 2018

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc