# utils-extend

> Extend nodejs util api, and it is light weight and simple

Latest version **1.0.8** (published 2015-04-12) · ISC license · 0 weekly downloads

## Install

```sh
npm install utils-extend
pnpm add utils-extend
yarn add utils-extend
bun add utils-extend
```

## Health

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

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

Negative: high vulnerabilities; abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.8 |
| Published | 2015-04-12 |
| First published | 2014-11-24 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 2 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | douzi |
| Maintainers | douzi |
| Keywords | util, utils, util-extend, extend, underscore, node underscore |

## Links

- npm: https://www.npmjs.com/package/utils-extend
- Repository: https://github.com/douzi8/utils-extend
- Issues: https://github.com/douzi8/utils-extend/issues
- npm.io page: https://npm.io/package/utils-extend

## Alternatives

- [lodash.assign](https://npm.io/package/lodash.assign.md) — 2.3M weekly downloads
- [lodash.chunk](https://npm.io/package/lodash.chunk.md) — 1.8M weekly downloads
- [react-native-ios-utilities](https://npm.io/package/react-native-ios-utilities.md) — 138.5K weekly downloads
- [@technically/lodash](https://npm.io/package/@technically/lodash.md) — 50.9K weekly downloads
- [@fluid-topics/ft-icon](https://npm.io/package/@fluid-topics/ft-icon.md) — 20.6K weekly downloads

## Recent versions

- 1.0.8 (latest) — 2015-04-12
- 1.0.7 — 2015-01-15
- 1.0.6 — 2014-12-07
- 1.0.5 — 2014-12-03
- 1.0.4 — 2014-12-01
- 1.0.3 — 2014-11-30
- 1.0.2 — 2014-11-30
- 1.0.1 — 2014-11-28
- 1.0.0 — 2014-11-24

## README

# utils-extend
[![NPM](https://nodei.co/npm/utils-extend.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/utils-extend/)  
Extend nodejs util api, and it is light weight and simple.
```
var util = require('utils-extend');
```
### install
```
npm install utils-extend --save
```
## API
### util
Extend api in nodejs util module, 

### util.extend
Deep clone soure object to target
```js
var target = {};
var source = {
  k: 'v',
  k2: []
};
var source2 = {
  k3: { }  
};

util.extend(target, source, source2);
```

### util.isObject
Check target is object, array and function return false.

### util.isArray
Chck target is array
```
uitl.isArray = Array.isArray

```
### util.isNumber

### util.isDate

### util.isRegExp

### util.isFunction

### util.isString

### util.isUndefined

### util.noop
Empty function

### util.unique
Make array unique.
```
var arr = [4, 5, 5, 6];
var result = uitl.unique(arr);
```
### util.pick
Return a copy of the object with list keys
```js
util.pick({ key: 'value' }, 'key');
util.pick({ key: 'value' }, function(value, key, object) { });
```

### util.escape
Escapes a string for insertion into HTML, replacing &, <, >, ", `, and ' characters.
```js
var html = '<div></div>'
var result = util.escape('<div></div>')
```

### util.unescape
The opposite of escape

### util.path.isAbsolute
Return true is path isabsolute, otherwise return false.
```
util.path.isAbsolute('C:\\file\\path');          // windows
util.path.isAbsolute('/file/path');              // unix
```

### util.path.unixifyPath
Normalize \ paths to / paths.

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