# atma-utils

> Helpers

Latest version **0.2.66** (published 2024-12-10) · 0 weekly downloads

## Install

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

## Health

**Score 35/100 (D)** — status: maintenance-mode.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.66 |
| Published | 2024-12-10 |
| First published | 2015-07-05 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 301.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Alex Kit |
| Maintainers | tenbits |

## Links

- npm: https://www.npmjs.com/package/atma-utils
- Repository: https://github.com/atmajs/utils
- Homepage: https://github.com/atmajs/utils#readme
- Issues: https://github.com/atmajs/utils/issues
- npm.io page: https://npm.io/package/atma-utils

## Recent versions

- 0.2.66 (latest) — 2024-12-10
- 0.2.65 — 2024-10-22
- 0.2.64 — 2024-07-18
- 0.2.63 — 2024-06-25
- 0.2.62 — 2024-06-25
- 0.2.61 — 2024-06-25
- 0.2.60 — 2022-05-04
- 0.2.59 — 2022-04-27
- 0.2.58 — 2022-01-19
- 0.2.57 — 2022-01-12
- 0.2.56 — 2022-01-11
- 0.2.53 — 2021-12-14
- 0.2.52 — 2021-12-14
- 0.2.51 — 2021-07-18
- 0.2.50 — 2021-07-18
- … 42 more at https://npm.io/package/atma-utils/versions

## README

Util Functions
----

[![Build Status](https://app.travis-ci.com/atmajs/utils.svg?branch=master)](https://app.travis-ci.com/github/atmajs/utils)

#### Embeddable

- `lib/utils.embed.js` All functions are in the top-level scope.

#### Module

- All functions are wrapped to an object, e.g. `require('atma-utils').obj_getProperty` or `import { obj_getProperty } from 'atma-utils'`


## Functions

- Object
    - `obj_getProperty(obj, path)`
    - `obj_setProperty(obj, path, val)`
    - `obj_extend(a, b)`
    - `obj_extendMany(a, [ ...args])`
    - `obj_create(obj)`
- Array
    - `arr_remove`
- Function
    - `fn_proxy(fn, ctx)`
    - `fn_doNothing`
- is
    - `is_Function(x)`
    - `is_String(x)`
    - `is_notEmptyString(x)`
    - `is_Array(x)`
    - `is_ArrayLike(x)`
    - `is_Object(x)`
    - `is_rawObject(x)`

- class
    - `class_create([...Base:Function|Object], Proto:Object)`

        ```javascript
        Proto := Object {
            constructor: Function,
            ...
        }
        ```

    - `class_createEx`

        Similar to `class_create` but also handles the property accessors. The `class_create` is in this way much more simple and has better performance.

    - `class_Dfr`

        Promise

    - `class_EventEmitter`

        Event Emitter

- error
    - `error_createClass(name:String, Proto:Object):Function`
    - `error_formatSource(source:String, index:Number, ?filename:String):String`
    - `error_cursor(source:String, index:Number):Array<lines, lineNum, rowNum>`
    - `error_formatCursor(lines:Array, lineNum: Number, rowNum: Number):String`

- Prototype fn references
    - `_Array_slice`
    - `_Array_splice`
    - `_Array_indexOf`
    - `_Obj_hasOwnProp_`


# Build

```bash
$ npm install
$ npm run build
```

# Release

- Bump
- Builds
- Commit `release` branch
- Push/Pulblish:
    - to `git`
    - to `npm`

```bash
$ npm install
$ npm run release
```

# Test

```bash
$ npm install
$ npm test
```

----



:copyright: 2021 - MIT - Atma.js

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