# @zionapps/core

> Helper Methods for Angular, Ionic and NgRx projects.

Latest version **1.0.6** (published 2021-12-24) · ISC license · 0 weekly downloads

## Install

```sh
npm install @zionapps/core
pnpm add @zionapps/core
yarn add @zionapps/core
bun add @zionapps/core
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2021-12-24 |
| First published | 2018-11-29 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 202.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Zion App Support |
| Maintainers | zionapps |
| Keywords | core, angular, ionic, ngrx |

## Links

- npm: https://www.npmjs.com/package/@zionapps/core
- npm.io page: https://npm.io/package/@zionapps/core

## Dependencies (4)

- [md5](https://npm.io/package/md5.md) ^2.2.1
- [moment](https://npm.io/package/moment.md) ^2.24.0
- [change-case](https://npm.io/package/change-case.md) ^3.1.0
- [remove-accents](https://npm.io/package/remove-accents.md) ^0.4.2

## 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.6 (latest) — 2021-12-24
- 1.0.5 — 2021-11-17
- 1.0.4 — 2021-11-17
- 1.0.3 — 2021-11-17
- 1.0.1 — 2021-08-20
- 1.0.0 — 2020-02-08
- 0.36.0 — 2020-01-18
- 0.35.0 — 2020-01-18
- 0.34.0 — 2019-11-09
- 0.33.0 — 2019-09-14
- 0.32.0 — 2019-08-26
- 0.31.3 — 2019-08-23
- 0.31.2 — 2019-08-23
- 0.31.1 — 2019-08-18
- 0.31.0 — 2019-08-15
- … 48 more at https://npm.io/package/@zionapps/core/versions

## README

# @zionapps/core

[![Build status](https://zionusa.visualstudio.com/zionapps-core/_apis/build/status/zionapps-core-CI)](https://zionusa.visualstudio.com/zionapps-core/_build/latest?definitionId=19)

Helper Methods for Angular, Ionic, NgRx or any TypeScript projects. This library is designed to prevent bugs from `null` and `undefined` variables and properties in runtime. Key areas of use include, but are not limited to:
- NgRx selectors
- Utility functions

```
npm install @zionapps/core --save
```

## Contents

1. Constants
2. Identity
3. Comparison
4. Sanitize
5. Transform
6. Get
7. Sort
8. Filter
9. Count
10. Time

### 1. Constants

```typescript
export const DEFAULT_COUNT = 0;
export const DEFAULT_ID = null;
export const DEFAULT_GUID = null;
export const DEFAULT_GUID_LENGTH = 36;
export const DEFAULT_NUMBER = 0;
export const DEFAULT_STRING = '';
export const MINIMUM_COUNT = 0;
export const MINIMUM_ID = 1;

// Time
export const HOURS_PER_DAY = 24;
export const MILLISECONDS = 1000;
export const MINUTES_PER_HOUR = 60;
export const SECONDS_PER_MINUTE = 60;
```

### 2. Identity

|                         | Item    | Object  | List    |
| :---------------------- | :-----: | :-----: | :-----: |
| hasAllItemsInList       |         |         | &check; |
| hasAllQueryValuesInList |         |         | &check; |
| hasAnyItems             |         |         | &check; |
| hasItemInList           |         |         | &check; |
| hasNoItems              |         |         | &check; |
| hasQueryValueInList     |         |         | &check; |
| hasUrl                  | &check; |         |         |
| isArray                 | &check; |         |         |
| isBoolean               | &check; |         |         |
| isCount                 | &check; |         |         |
| isGuid                  | &check; |         |         |
| isId                    | &check; |         |         |
| isIframe                | &check; |         |         |
| isIframeUrlMatching     | &check; |         |         |
| isNumber                | &check; |         |         |
| isObject                | &check; |         |         |
| isString                | &check; |         |         |
| isUrl                   | &check; |         |         |
| isUrlMatching           | &check; |         |         |
| isItemDefined           | &check; | &check; | &check; |
| isItemNotDefined        | &check; | &check; | &check; |
| isPropertyDefined       |         | &check; |         |

### 3. Comparison Functions

|                            | Item    | Object  | List    |
| :------------------------- | :-----: | :-----: | :-----: |
| caseInsensitiveEquals      | &check; |         |         |
| caseInsensitiveIncludes    | &check; |         |         |
| caseInsensitiveStartsWith  | &check; |         |         |
| startsWith                 | &check; |         |         |

### 4. Sanitize Functions

|                     | Item    | Object  | List    |
| :------------------ | :-----: | :-----: | :-----: |
| sanitizeArray       |         |         | &check; |
| sanitizeArrayList   |         |         | &check; |
| sanitizeBoolean     | &check; |         |         |
| sanitizeBooleanList |         |         | &check; |
| sanitizeCount       | &check; |         |         |
| sanitizeCountList   |         |         | &check; |
| sanitizeGuid        | &check; |         |         |
| sanitizeGuidList    |         |         | &check; |
| sanitizeId          | &check; |         |         |
| sanitizeIdList      |         |         | &check; |
| sanitizeList        |         |         | &check; |
| sanitizeNumber      | &check; |         |         |
| sanitizeNumberList  |         |         | &check; |
| sanitizeObject      |         | &check; |         |
| sanitizeObjectList  |         |         | &check; |
| sanitizeString      | &check; |         |         |
| sanitizeStringList  |         |         | &check; |

### 5. Get Functions

|                         | Item    | Object  | List    |
| :---------------------- | :-----: | :-----: | :-----: |
| getArrayPropertyValue   |         | &check; |         |
| getBooleanPropertyValue |         | &check; |         |
| getCountPropertyValue   |         | &check; |         |
| getGuidPropertyValue    |         | &check; |         |
| getIdPropertyValue      |         | &check; |         |
| getNumericPropertyValue |         | &check; |         |
| getObjectPropertyValue  |         | &check; |         |
| getPropertyValue        |         | &check; |         |
| getStringPropertyValue  |         | &check; |         |
| getSrcFromIframe        | &check; |         |         |

### 6. Transform

|             | Item    | Object  | List    |
| :---------- | :-----: | :-----: | :-----: |
| stringUtils | &check; |         |         |

### 7. Sort Functions

|                                   | Item    | Object  | List    |
| :-------------------------------- | :-----: | :-----: | :-----: |
| sortNumbersAscending              |         |         | &check; |
| sortNumbersDescending             |         |         | &check; |
| sortStringAscending               |         |         | &check; |
| sortNumbersDescending             |         |         | &check; |
| sortCaseSensitiveStringAscending  |         |         | &check; |
| sortStringDescending              |         |         | &check; |
| sortCaseSensitiveStringDescending |         |         | &check; |
| sortNumberPropertyAscending       |         |         | &check; |
| sortNumberPropertyDescending      |         |         | &check; |
| sortStringPropertyAscending       |         |         | &check; |
| sortStringPropertyDescending      |         |         | &check; |

### 8. Filter Functions

|                                   | Item    | Object  | List    |
| :-------------------------------- | :-----: | :-----: | :-----: |
| filterItemsEqualing               |         |         | &check; |
| filterItemsNotEqualing            |         |         | &check; |
| filterStringIncluding             |         |         | &check; |
| filterPropertyEqualing            |         |         | &check; |
| filterPropertyNotEqualing         |         |         | &check; |

### 9. Count Functions

|                      | Item    | Object  | List    |
| :------------------- | :-----: | :-----: | :-----: |
| countItems           |         |         | &check; |
| countPropertyValue   |         |         | &check; |

### 10. Time

|                      | Item    | Object  | List    |
| :------------------- | :-----: | :-----: | :-----: |
| getISOTimestamp      | &check; |         |         |

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