1.0.6 • Published 2 years ago

@zionapps/core v1.0.6

Weekly downloads
61
License
ISC
Repository
-
Last release
2 years ago

@zionapps/core

Build status

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

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

ItemObjectList
hasAllItemsInList
hasAllQueryValuesInList
hasAnyItems
hasItemInList
hasNoItems
hasQueryValueInList
hasUrl
isArray
isBoolean
isCount
isGuid
isId
isIframe
isIframeUrlMatching
isNumber
isObject
isString
isUrl
isUrlMatching
isItemDefined
isItemNotDefined
isPropertyDefined

3. Comparison Functions

ItemObjectList
caseInsensitiveEquals
caseInsensitiveIncludes
caseInsensitiveStartsWith
startsWith

4. Sanitize Functions

ItemObjectList
sanitizeArray
sanitizeArrayList
sanitizeBoolean
sanitizeBooleanList
sanitizeCount
sanitizeCountList
sanitizeGuid
sanitizeGuidList
sanitizeId
sanitizeIdList
sanitizeList
sanitizeNumber
sanitizeNumberList
sanitizeObject
sanitizeObjectList
sanitizeString
sanitizeStringList

5. Get Functions

ItemObjectList
getArrayPropertyValue
getBooleanPropertyValue
getCountPropertyValue
getGuidPropertyValue
getIdPropertyValue
getNumericPropertyValue
getObjectPropertyValue
getPropertyValue
getStringPropertyValue
getSrcFromIframe

6. Transform

ItemObjectList
stringUtils

7. Sort Functions

ItemObjectList
sortNumbersAscending
sortNumbersDescending
sortStringAscending
sortNumbersDescending
sortCaseSensitiveStringAscending
sortStringDescending
sortCaseSensitiveStringDescending
sortNumberPropertyAscending
sortNumberPropertyDescending
sortStringPropertyAscending
sortStringPropertyDescending

8. Filter Functions

ItemObjectList
filterItemsEqualing
filterItemsNotEqualing
filterStringIncluding
filterPropertyEqualing
filterPropertyNotEqualing

9. Count Functions

ItemObjectList
countItems
countPropertyValue

10. Time

ItemObjectList
getISOTimestamp
1.0.6

2 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago

1.0.0

4 years ago

0.36.0

4 years ago

0.35.0

4 years ago

0.34.0

5 years ago

0.33.0

5 years ago

0.32.0

5 years ago

0.31.3

5 years ago

0.31.2

5 years ago

0.31.1

5 years ago

0.31.0

5 years ago

0.30.0

5 years ago

0.29.0

5 years ago

0.28.0

5 years ago

0.27.0

5 years ago

0.26.0

5 years ago

0.25.1

5 years ago

0.25.0

5 years ago

0.24.0

5 years ago

0.23.0

5 years ago

0.22.1

5 years ago

0.22.0

5 years ago

0.21.2

5 years ago

0.21.1

5 years ago

0.21.0

5 years ago

0.20.5

5 years ago

0.20.4

5 years ago

0.20.2

5 years ago

0.20.1

5 years ago

0.20.0

5 years ago

0.10.0

5 years ago

0.9.39

5 years ago

0.9.19

5 years ago

0.9.18

5 years ago

0.9.17

5 years ago

0.9.16

5 years ago

0.9.13

5 years ago

0.9.11

5 years ago

0.9.10

5 years ago

0.9.9

5 years ago

0.9.8

5 years ago

0.9.7

5 years ago

0.9.6

5 years ago

0.9.5

5 years ago

0.9.4

5 years ago

0.9.3

5 years ago

0.9.2

5 years ago

0.9.1

5 years ago

0.9.0

5 years ago

0.8.6

5 years ago

0.8.5

5 years ago

0.8.4

5 years ago

0.8.3

5 years ago

0.8.2

5 years ago

0.8.1

5 years ago

0.8.0

5 years ago

0.7.0

5 years ago

0.6.0

5 years ago

0.3.4

5 years ago