Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tng/infra

Package Overview
Dependencies
Maintainers
3
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tng/infra

Infra ======

  • 1.3.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
3
Weekly downloads
 
Created
Source

Infra

挂载infra配置到config中去

说明

- require('@tng/infra')([config对象], [infra配置路径])
  - config: 默认空对象
  - infra配置路径: 默认`config/infra.json`
    - 支持 json, json5, js 格式

安装

yarn add @tng/infra

使用

// config

{
  a: 'a',
  b: {
    b: 'b',
    bb: 'bb'
  },
  c: {
    c: {
      c: 'c',
      cc: 'cc'
    },
    ccc: 'ccc'
  }
}

// infra

{
  b: {
    b: 'd'
  },
  c: {
    c: {
      cc: 'oo'
    }
  }
}

require('@tng/infra')(config)

config: 差异覆盖, 合并后为

{
  a: 'a',
  b: {
    b: 'd',
    bb: 'bb'
  },
  c: {
    c: {
      c: 'c',
      cc: 'oo'
    },
    ccc: 'ccc'
  }
}

FAQs

Package last updated on 06 Jun 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