
Product
Socket Brings Supply Chain Security to skills.sh
Socket is now scanning AI agent skills across multiple languages and ecosystems, detecting malicious behavior before developers install, starting with skills.sh's 60,000+ skills.
extend-file
Advanced tools
Extend a JSON file with additional properties, API and CLI.
Install with npm
$ npm i extend-file --save
(Table of contents generated by verb)
var extendFile = require('extend-file');
extendFile('package.json', {foo: 'bar'});
// adds `{foo: "bar"} to package.json
Pass the file to extend as the first argument.
$ expand-file package.json [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 dataPass an object
Use the object expansion syntax supported by expand-object:
$ expand-file package.json -d "a.b.c:foo,bar,baz"
#=> "a":{"b":{"c":["foo","bar","baz"]}}}
Any issues related to --data expansion should be created on the expand-objectrepo.
Specify a JSON or YAML file
Use the contents of another file to extend the first file.
$ expand-file package.json -f foo.yml
JSON and YAML are supported.
expand-object: Expand a string into a JavaScript object using a simple notation. Use the CLI or… more
Install dev dependencies:
$ npm i -d && npm test
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue
Jon Schlinkert
Copyright © 2015 Jon Schlinkert Released under the MIT license.
This file was generated by verb-cli on August 01, 2015.
FAQs
Extend a JSON file with additional properties, API and CLI.
The npm package extend-file receives a total of 0 weekly downloads. As such, extend-file popularity was classified as not popular.
We found that extend-file demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Product
Socket is now scanning AI agent skills across multiple languages and ecosystems, detecting malicious behavior before developers install, starting with skills.sh's 60,000+ skills.

Product
Socket now supports PHP with full Composer and Packagist integration, enabling developers to search packages, generate SBOMs, and protect their PHP dependencies from supply chain threats.

Security News
An AI agent is merging PRs into major OSS projects and cold-emailing maintainers to drum up more work.