
Security News
Node.js Drops Bug Bounty Rewards After Funding Dries Up
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.
async-extend-defaults
Advanced tools
Simple async function to extend or defaults object.
Extends async module.
If you use in your project any other async function from async module (of course you are :) ),
please make sure that you install async module into your node_modules.
It is desirable to use in your project one instance of async module. Read about Node.JS Folders and Modules
dependencies.
npm install async
npm install async-extend-defaults
##Usage
var asyncExtend = require('async-extend-defaults').extend
var asyncDefaults = require('async-extend-defaults').defaults
var extendableObject = {deep: {yes: true}, one: 1}
asyncExtend(
extendableObject,
{two: 2},
{deep: {yes: 'it is'}},
function (extended) {
console.log(extended === extendableObject) // true
console.log(extended) // {deep: {yes: 'it is'}, one: 1, two: 2}
}
)
var defaultsObject = {deep: {yes: true}, one: 1}
asyncDefaults(
defaultsObject,
{one: 'no'},
{two: 2},
{deep: {yes: 'it is'}},
function (options) {
console.log(options === defaultsObject) // true
console.log(options) // {deep: {yes: true}, one: 1, two: 2}
}
)
If you want async clone object then you can do:
var asyncExtend = require('async-extend-defaults').extend
asyncExtend({}, sourceObject, function (clone) {})
If you have installed async module, and install async-extend-defaults after async, you can use module like this:
// Order is not important
var async = require('async')
// Require once in project
require('async-extend-defaults')
// extend and defaults function extends async
async.extend()
async.defaults()
(MIT License)
FAQs
Async deep extend and defaults functions
We found that async-extend-defaults 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.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.