# lodash-extendall

> Extend Lodash to allow all objects in an array of objects to be extended i.e. to have new properties added or existing properties updated.

Latest version **1.0.2** (published 2018-02-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install lodash-extendall
pnpm add lodash-extendall
yarn add lodash-extendall
bun add lodash-extendall
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2018-02-27 |
| First published | 2018-02-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | David Waterston |
| Maintainers | davidwaterston |

## Links

- npm: https://www.npmjs.com/package/lodash-extendall
- Repository: https://github.com/davidwaterston/lodash-extendall
- Homepage: https://github.com/davidwaterston/lodash-extendall#readme
- Issues: https://github.com/davidwaterston/lodash-extendall/issues
- npm.io page: https://npm.io/package/lodash-extendall

## Dependencies (1)

- [lodash](https://npm.io/package/lodash.md) ^4.17.5

## Recent versions

- 1.0.2 (latest) — 2018-02-27
- 1.0.1 — 2018-02-27
- 1.0.0 — 2018-02-26

## README

# Lodash extendall

[![Build Status](https://travis-ci.org/davidwaterston/lodash-extendall.svg)](https://travis-ci.org/davidwaterston/lodash-extendall)
[![Known Vulnerabilities](https://snyk.io/test/github/davidwaterston/lodash-extendall/badge.svg?targetFile=package.json)](https://snyk.io/test/github/davidwaterston/lodash-extendall?targetFile=package.json)
[![NPM version](http://img.shields.io/npm/v/lodash-extendall.svg)](https://www.npmjs.com/package/lodash-extendall/)


Extend [Lodash](https://lodash.com/) to allow all objects in an array of objects to be extended i.e. to have new properties added or existing properties updated based on input object properties.
Returns a new array with the original array left unchanged.  
Does minimal checking of inputs; assumes the array is an array of objects.


### _.extendAll(arr, obj)

**Arguments**  
arr (array): The array of objects to be extended. Required.  
obj (object): The object to be used to extend each object in the array. Where a property in this object doesn't exist in the array object it will be added. Where it does exist it will be replaced.

**Returns**  
(array): An new array of extended objects.  


### Examples  
```
var _ = require('lodash')
require('lodash-extendall')

_.extendAll([{a:1, b:2},{a:3, b:4}], {x:'new1', y:'new2'}) // [{a:1, b:2, x:'new1', y:'new2'},{a:3, b:4, x:'new1', y:'new2'}]
_.extendAll([{a:1, b:2},{a:3, b:4}], {a:999, x:'new1'}) // [{a:999, b:2, x:'new1'},{a:999, b:4, x:'new1'}]
_.extendAll([{a:1, b:2},{a:3, b:4}], {}}) // [{a:1, b:2},{a:3, b:4}]
_.extendAll([{a:1, b:2},{a:3, b:4}], ['abc']) // [{a:1, b:2},{a:3, b:4}]
_.extendAll([]], {a:false, x:false}) // []
_.extendAll([{a:1, b:2},{a:3}], {b:false}) // [{a:1, b:false},{a:3, b:false}]
```


### Version History

| Version | Release Date | Details |   
| :-- | :-- | :-- |    
| 1.0.2 | 27th February, 2018 | Update the Version History. No functionality changes. |
| 1.0.1 | 27th February, 2018 | Fix layout issues with Examples in the README. No functionality changes. |
| 1.0.0 | 26th February, 2018 | Initial release. |

---
_Source: https://npm.io/package/lodash-extendall · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
