Latest Threat Research:Malicious dYdX Packages Published to npm and PyPI After Maintainer Compromise.Details
Socket
Book a DemoInstallSign in
Socket

extend-file

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

extend-file

Extend a JSON file with additional properties, API and CLI.

Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
1
-50%
Maintainers
1
Weekly downloads
 
Created
Source

extend-file NPM version

Extend a JSON file with additional properties, API and CLI.

Install

Install with npm

$ npm i extend-file --save

(Table of contents generated by verb)

Usage

var extendFile = require('extend-file');

extendFile('package.json', {foo: 'bar'});
// adds `{foo: "bar"} to package.json

CLI

Pass the file to extend as the first argument.

$ expand-file package.json [data]
                 ^

data

Specify the data to use for extending the file.

$ expand-file package.json [data]
                             ^

Data may be specified using one of the following flags:

  • -d or --data: specify a string to expand with [expand-object]
  • -f or --file: specify a JSON or YAML file to use for data

Example:

$ expand-file package.json -d "a.b.c:foo,bar,baz"
#=> "a":{"b":{"c":["foo","bar","baz"]}}}

Return issues related to --data expansion on the [expand-object] repo.

expand-object: Expand a string into a JavaScript object using a simple notation. Use the CLI or… more

Running tests

Install dev dependencies:

$ npm i -d && npm test

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue

Author

Jon Schlinkert

License

Copyright © 2015 Jon Schlinkert Released under the MIT license.

This file was generated by verb-cli on August 01, 2015.

Keywords

assign

FAQs

Package last updated on 01 Aug 2015

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