# xobjext

> Object manipulation utilites

Latest version **1.0.5** (published 2020-10-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install xobjext
pnpm add xobjext
yarn add xobjext
bun add xobjext
```

## 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.5 |
| Published | 2020-10-25 |
| First published | 2020-07-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Stephane Potelle |
| Maintainers | stefpo |

## Links

- npm: https://www.npmjs.com/package/xobjext
- Repository: https://framagit.org/stefpo/xobjext
- npm.io page: https://npm.io/package/xobjext

## Recent versions

- 1.0.5 (latest) — 2020-10-25
- 1.0.4 — 2020-07-31
- 1.0.3 — 2020-07-31
- 1.0.2 — 2020-07-31
- 1.0.1 — 2020-07-30
- 1.0.0 — 2020-07-07

## README

# xobjext

A small library to help with object manipulation

- Merge objects
- Clone object
- Smart promisify functions 


## Functions

### merge(dest, source, createProperties)
Merges source into dest object. If createProperties is true, the new properties from source are added, otherwise the schema of dest is unchanged.

### clone (v) 
Returns a deep copy of v

### ESNextFunction(f, obj)
Returns a function that provides both promise and callback behavior. When the last parameter passed to the returned function is a function, then the callback behavior is used, otherwise, the function returns a promise.

Example:

        function myFuncCB ( p1, p2, callback ) {
         --
         -- callback ( someResult )
        }

        myFunc = ESNextFunction(myFuncCB)

You can then call: 
    
        myfunc(v1, v2, function( res ) {
                console.log ("Result:" + res)
            })

or (in async function):

        res = await myfunc(v1, v2)
        console.log (res)

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