Socket
Book a DemoInstallSign in
Socket

@speedy/json-extends

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@speedy/json-extends

Extend a JSON file with one or many existing files.

Source
npmnpm
Version
1.0.1
Version published
Weekly downloads
846
-72.56%
Maintainers
1
Weekly downloads
 
Created
Source

@speedy/json-extends

CircleCI npm version Dependency Status devDependency Status

Extend a JSON file with one or many existing files.

Installation

npm install @speedy/json-extends --save

Usage

read(filePath, extendsMap) ⇒ Promise.<T>

Retrieve a JSON file. Supports extends with one or many existing JSON files.

Extends supports also aliased paths, as shown in the example.

ParamTypeRequiredDescription
filePathstringtruepath to a JSON file.
extendsMap{[id: string]: string }falseA key value pair of maps for JSON files.
import { json } from "@speedy/json-extends";

const maps = {
  "@speedy/commit-msg-hook:latest": "./node_modules/config/config.json"
};

json.read("local-config.json", maps)
  .then(content => {
    // json content
  });

JSON file

{
  "@extends": [
    "@speedy/commit-msg-hook:latest",
    "./local/config.json"
  ],
  "rules": {
    "no-dash": true
  }
}

Keywords

json

FAQs

Package last updated on 01 Apr 2017

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