npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ibm-wch-sdk-utils

v5.0.361

Published

Software development kit to simplify the development of Angular based single page applications against Watson Content Hub.

Downloads

10

Readme

ibm-wch-sdk-utils

Exposes framework independent APIs to support the implementation of ibm-wch-sdk-ng and similar SDK.

Details

Refer to the documentation.

Changes

CHANGELOG

Class documentation

Refer to the documentation.

Utils

TBD

Changelog

Current

Added

  • Added typecheck methods for the new group element type
  • New getCategoryLeaf helper function
  • Initial version

Utils

TBD

Index

External modules


ibm-wch-sdk-utils > "cache/cache.utils"

External module: "cache/cache.utils"

Index

Interfaces

Type aliases

Variables

Functions


Type aliases

CacheAccessor

Ƭ CacheAccessor: BiFunction<string, CacheCallback<V>, V>

Defined in cache/cache.utils.ts:11


CacheCallback

Ƭ CacheCallback: UnaryFunction<string, V>

Defined in cache/cache.utils.ts:10


Variables

<Const> DEFAULT_MAXCOUNT

● DEFAULT_MAXCOUNT: 100 = 100

Defined in cache/cache.utils.ts:28


<Const> DEFAULT_TIMEOUT

● DEFAULT_TIMEOUT: number = 30 * 1000

Defined in cache/cache.utils.ts:25


Functions

<Const> _createCache

_createCache<V>(aTimeout?: number, aMaxValues?: number, aLogger?: Logger): CacheAccessor<V>

Defined in cache/cache.utils.ts:38

Constructs a new cache

Type parameters:

V

Parameters:

| Param | Type | Description | | ------ | ------ | ------ | | Optional aTimeout | number | timeout | | Optional aMaxValues | number | maximum cache entries | | Optional aLogger | Logger |

Returns: CacheAccessor<V> the accessor function


ibm-wch-sdk-utils > "categories/categories"

External module: "categories/categories"

Index

Functions


Functions

<Const> getCategoryLeaf

getCategoryLeaf(aCategory: Category, aIndex?: number, aFallback?: string): string

Defined in categories/categories.ts:13

Extracts the last category element

Parameters:

| Param | Type | Description | | ------ | ------ | ------ | | aCategory | Category | the category | | Optional aIndex | number | category index | | Optional aFallback | string | fallback |

Returns: string the last element


ibm-wch-sdk-utils > "consumers/consumer"

External module: "consumers/consumer"

Index

Type aliases


Type aliases

BiConsumer

Ƭ BiConsumer: BiFunction<T1, T2, any>

Defined in consumers/consumer.ts:5


BiFunction

Ƭ BiFunction: function

Defined in consumers/consumer.ts:4

Type declaration

▸(t1: T1, t2: T2): R

Parameters:

| Param | Type | | ------ | ------ | | t1 | T1 | | t2 | T2 |

Returns: R


Consumer

Ƭ Consumer: UnaryFunction<T, any>

Defined in consumers/consumer.ts:3


ibm-wch-sdk-utils > "cors/cors.utils"

External module: "cors/cors.utils"

Index

Variables

Functions


Variables

<Const> NULL_ORIGIN

● NULL_ORIGIN: "null" = "null"

Defined in cors/cors.utils.ts:11


<Const> _ALL_ORIGINS

● _ALL_ORIGINS: ""* = "*"

Defined in cors/cors.utils.ts:8


Functions

_testOrigin

_testOrigin(aOrigin: string, aAllowedOrigins: string[], aLogger?: Logger): boolean

Defined in cors/cors.utils.ts:21

Parameters:

| Param | Type | | ------ | ------ | | aOrigin | string | | aAllowedOrigins | string[] | | Optional aLogger | Logger |

Returns: boolean


ibm-wch-sdk-utils > "debug/debug.utils"

External module: "debug/debug.utils"

Index

Type aliases

Variables

Functions


Type aliases

AddDebugCallback

Ƭ AddDebugCallback: function

Defined in debug/debug.utils.ts:13

Type declaration

▸(aDbg: any): void

Parameters:

| Param | Type | | ------ | ------ | | aDbg | any |

Returns: void


Variables

<Let> COUNTER

● COUNTER: number = 0

Defined in debug/debug.utils.ts:5


<Const> _isFrozen

● _isFrozen: isFrozen = Object.isFrozen

Defined in debug/debug.utils.ts:11


Functions

_addDebugInfo

_addDebugInfo<T>(aCallback: AddDebugCallback, aObject: T): T

Defined in debug/debug.utils.ts:33

Augments the object with debug information

Type parameters:

T

Parameters:

| Param | Type | Description | | ------ | ------ | ------ | | aCallback | AddDebugCallback | | aObject | T | the object |

Returns: T the object


_addSourceCallback

_addSourceCallback(aSource: string): AddDebugCallback

Defined in debug/debug.utils.ts:18

Adds source information

Parameters:

| Param | Type | | ------ | ------ | | aSource | string |

Returns: AddDebugCallback


_addSourceDebug

_addSourceDebug<T>(aSource: string, aObject: T): T

Defined in debug/debug.utils.ts:54

Adds source information

Type parameters:

T

Parameters:

| Param | Type | Description | | ------ | ------ | ------ | | aSource | string | source info | | aObject | T | the object |

Returns: T the original object


_getCounter

_getCounter(): number

Defined in debug/debug.utils.ts:7

Returns: number


ibm-wch-sdk-utils > "elements/element"

External module: "elements/element"

Index

Variables

Functions

Object literals


Variables

<Const> _PROP_ID

● _PROP_ID: "id" = "id"

Defined in elements/element.ts:82


<Const> _PROP_SELECTION

● _PROP_SELECTION: "selection" = "selection"

Defined in elements/element.ts:80


<Const> _PROP_TYPE

● _PROP_TYPE: "elementType" = "elementType"

Defined in elements/element.ts:77


<Const> _PROP_TYPE_REF

● _PROP_TYPE_REF: "typeRef" = "typeRef"

Defined in elements/element.ts:81


<Const> _PROP_VALUE

● _PROP_VALUE: "value" = "value"

Defined in elements/element.ts:78


<Const> _PROP_VALUES

● _PROP_VALUES: "values" = "values"

Defined in elements/element.ts:79


Functions

<Const> _falseHandler

_falseHandler(): boolean

Defined in elements/element.ts:570

Returns: boolean


<Const> _getHandler

_getHandler(aElementType: string): Predicate<any>

Defined in elements/element.ts:572

Parameters:

| Param | Type | | ------ | ------ | | aElementType | string |

Returns: Predicate<any>


_isCategoryElement

_isCategoryElement(aValue: any): boolean

Defined in elements/element.ts:332

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isDateElement

_isDateElement(aValue: any): boolean

Defined in elements/element.ts:322

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isElement

_isElement(aValue: any): boolean

Defined in elements/element.ts:580

Tests if the value is a value element

Parameters:

| Param | Type | Description | | ------ | ------ | ------ | | aValue | any | the value |

Returns: boolean true if the value is a valid element


_isFile

_isFile(aValue: any): boolean

Defined in elements/element.ts:346

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isFileElement

_isFileElement(aValue: any): boolean

Defined in elements/element.ts:342

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isFormattedTextElement

_isFormattedTextElement(aValue: any): boolean

Defined in elements/element.ts:222

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isGroup

_isGroup(aValue: any): boolean

Defined in elements/element.ts:192

Tests if the value is a vaid group

Parameters:

| Param | Type | Description | | ------ | ------ | ------ | | aValue | any | the value |

Returns: boolean true if the value is a group, else false


_isGroupElement

_isGroupElement(aValue: any): boolean

Defined in elements/element.ts:182

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isImage

_isImage(aValue: any): boolean

Defined in elements/element.ts:358

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isImageElement

_isImageElement(aValue: any): boolean

Defined in elements/element.ts:398

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isLink

_isLink(aValue: any): boolean

Defined in elements/element.ts:354

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isLinkElement

_isLinkElement(aValue: any): boolean

Defined in elements/element.ts:312

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isLocationElement

_isLocationElement(aValue: any): boolean

Defined in elements/element.ts:498

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isMultiDateElement

_isMultiDateElement(aValue: any): boolean

Defined in elements/element.ts:172

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isMultiFileElement

_isMultiFileElement(aValue: any): boolean

Defined in elements/element.ts:378

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isMultiFormattedTextElement

_isMultiFormattedTextElement(aValue: any): boolean

Defined in elements/element.ts:242

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isMultiGroupElement

_isMultiGroupElement(aValue: any): boolean

Defined in elements/element.ts:212

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isMultiImageElement

_isMultiImageElement(aValue: any): boolean

Defined in elements/element.ts:418

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isMultiLinkElement

_isMultiLinkElement(aValue: any): boolean

Defined in elements/element.ts:458

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isMultiNumberElement

_isMultiNumberElement(aValue: any): boolean

Defined in elements/element.ts:272

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isMultiOptionSelectionElement

_isMultiOptionSelectionElement(aValue: any): boolean

Defined in elements/element.ts:122

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isMultiReferenceElement

_isMultiReferenceElement(aValue: any): boolean

Defined in elements/element.ts:488

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isMultiTextElement

_isMultiTextElement(aValue: any): boolean

Defined in elements/element.ts:152

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isMultiToggleElement

_isMultiToggleElement(aValue: any): boolean

Defined in elements/element.ts:302

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isMultiVideoElement

_isMultiVideoElement(aValue: any): boolean

Defined in elements/element.ts:438

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isNumberElement

_isNumberElement(aValue: any): boolean

Defined in elements/element.ts:252

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isOptionSelection

_isOptionSelection(aValue: any): boolean

Defined in elements/element.ts:102

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isOptionSelectionElement

_isOptionSelectionElement(aValue: any): boolean

Defined in elements/element.ts:98

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isReferenceElement

_isReferenceElement(aValue: any): boolean

Defined in elements/element.ts:468

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isSingleDateElement

_isSingleDateElement(aValue: any): boolean

Defined in elements/element.ts:162

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isSingleFileElement

_isSingleFileElement(aValue: any): boolean

Defined in elements/element.ts:368

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isSingleFormattedTextElement

_isSingleFormattedTextElement(aValue: any): boolean

Defined in elements/element.ts:232

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isSingleGroupElement

_isSingleGroupElement(aValue: any): boolean

Defined in elements/element.ts:202

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isSingleImageElement

_isSingleImageElement(aValue: any): boolean

Defined in elements/element.ts:408

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isSingleLinkElement

_isSingleLinkElement(aValue: any): boolean

Defined in elements/element.ts:448

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isSingleNumberElement

_isSingleNumberElement(aValue: any): boolean

Defined in elements/element.ts:262

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isSingleOptionSelectionElement

_isSingleOptionSelectionElement(aValue: any): boolean

Defined in elements/element.ts:112

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isSingleReferenceElement

_isSingleReferenceElement(aValue: any): boolean

Defined in elements/element.ts:478

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isSingleTextElement

_isSingleTextElement(aValue: any): boolean

Defined in elements/element.ts:142

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isSingleToggleElement

_isSingleToggleElement(aValue: any): boolean

Defined in elements/element.ts:292

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isSingleVideoElement

_isSingleVideoElement(aValue: any): boolean

Defined in elements/element.ts:428

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isSomeDateElement

_isSomeDateElement(aValue: any): boolean

Defined in elements/element.ts:502

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isSomeFileElement

_isSomeFileElement(aValue: any): boolean

Defined in elements/element.ts:506

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isSomeFormattedTextElement

_isSomeFormattedTextElement(aValue: any): boolean

Defined in elements/element.ts:510

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isSomeGroupElement

_isSomeGroupElement(aValue: any): boolean

Defined in elements/element.ts:514

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isSomeImageElement

_isSomeImageElement(aValue: any): boolean

Defined in elements/element.ts:518

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isSomeLinkElement

_isSomeLinkElement(aValue: any): boolean

Defined in elements/element.ts:522

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isSomeNumberElement

_isSomeNumberElement(aValue: any): boolean

Defined in elements/element.ts:526

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isSomeOptionSelectionElement

_isSomeOptionSelectionElement(aValue: any): boolean

Defined in elements/element.ts:530

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isSomeReferenceElement

_isSomeReferenceElement(aValue: any): boolean

Defined in elements/element.ts:534

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isSomeTextElement

_isSomeTextElement(aValue: any): boolean

Defined in elements/element.ts:538

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isSomeToggleElement

_isSomeToggleElement(aValue: any): boolean

Defined in elements/element.ts:542

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isSomeVideoElement

_isSomeVideoElement(aValue: any): boolean

Defined in elements/element.ts:546

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isTextElement

_isTextElement(aValue: any): boolean

Defined in elements/element.ts:132

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isToggleElement

_isToggleElement(aValue: any): boolean

Defined in elements/element.ts:282

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isType

_isType(aType: string, aValue: * any | null | undefined*): boolean

Defined in elements/element.ts:84

Parameters:

| Param | Type | | ------ | ------ | | aType | string | | aValue | any | null | undefined|

Returns: boolean


_isTypeRef

_isTypeRef(aValue: any): boolean

Defined in elements/element.ts:88

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isVideo

_isVideo(aValue: any): boolean

Defined in elements/element.ts:350

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


_isVideoElement

_isVideoElement(aValue: any): boolean

Defined in elements/element.ts:388

Parameters:

| Param | Type | | ------ | ------ | | aValue | any |

Returns: boolean


Object literals

<Const> HANDLERS

HANDLERS: object

Defined in elements/element.ts:553

Maps from element type to handler function

__computed

● __computed: _isSomeVideoElement = _isSomeVideoElement

Defined in elements/element.ts:554 Defined in elements/element.ts:555 Defined in elements/element.ts:556 Defined in elements/element.ts:557 Defined in elements/element.ts:558 Defined in elements/element.ts:559 Defined in elements/element.ts:560 Defined in elements/element.ts:561 Defined in elements/element.ts:562 Defined in elements/element.ts:563 Defined in elements/element.ts:564 Defined in elements/element.ts:565 Defined in elements/element.ts:566 Defined in elements/element.ts:567



ibm-wch-sdk-utils > "error/error"

External module: "error/error"

Index

Functions


Functions

isErrorResponse

isErrorResponse(aResponse: any): boolean

Defined in error/error.ts:10

Tests if a response is an error response

Parameters:

| Param | Type | Description | | ------ | ------ | ------ | | aResponse | any | the response object |

Returns: boolean true if the response is an error response, else false


ibm-wch-sdk-utils > "generators/generator"

External module: "generators/generator"

Index

Type aliases

Functions


Type aliases

Generator

Ƭ Generator: function

Defined in generators/generator.ts:3

Type declaration

▸(): T | null | undefined

Returns: T | null | undefined


Functions

<Const> _arrayGenerator

_arrayGenerator<T>(): T[]

Defined in generators/generator.ts:5

Type parameters:

T

Returns: T[]


<Const> _objectGenerator

_objectGenerator(): any

Defined in generators/generator.ts:6

Returns: any


ibm-wch-sdk-utils > "generators/lazy.generator"

External module: "generators/lazy.generator"

Index

Functions


Functions

_lazyGenerator

_lazyGenerator<T>(aGenerator: Generator<T>): Generator<T>

Defined in generators/lazy.generator.ts:10

Creates a lazy generator for the value

Type parameters:

T

Parameters:

| Param | Type | Description | | ------ | ------ | ------ | | aGenerator | Generator<T> | the generator |

Returns: Generator<T> the generator


ibm-wch-sdk-utils > "hash/hash.utils"

External module: "hash/hash.utils"

Index

Variables

Functions


Variables

<Const> GOLDEN_RATIO_64

● GOLDEN_RATIO_64: 1140071481932319900 = 1140071481932319900

Defined in hash/hash.utils.ts:8


<Const> HASH_SEED_64

● HASH_SEED_64: 5177618702824568000 = 5177618702824568000

Defined in hash/hash.utils.ts:11


<Const> _DIGITS

● _DIGITS: "0123456789" = "0123456789"

Defined in hash/hash.utils.ts:41


<Const> _FIRST_LETTERS

● _FIRST_LETTERS: string = _START + _LOWERCASE + _UPPERCASE

Defined in hash/hash.utils.ts:46


<Const> _FIRST_LETTERS_LENGTH

● _FIRST_LETTERS_LENGTH: number = _FIRST_LETTERS.length

Defined in hash/hash.utils.ts:48


<Const> _LOWERCASE

● _LOWERCASE: "abcdefghijklmnopqrstuvwxyz" = "abcdefghijklmnopqrstuvwxyz"

Defined in hash/hash.utils.ts:42


<Const> _MAX_INT

● _MAX_INT: number = Number.MAX_SAFE_INTEGER

Defined in hash/hash.utils.ts:78


<Const> _NEXT_LETTERS

● _NEXT_LETTERS: string = _FIRST_LETTERS + _DIGITS

Defined in hash/hash.utils.ts:47


<Const> _NEXT_LETTERS_LENGTH

● _NEXT_LETTERS_LENGTH: number = _NEXT_LETTERS.length

Defined in hash/hash.utils.ts:49


<Const> _START

● _START: "$_" = "$_"

Defined in hash/hash.utils.ts:40


<Const> _UPPERCASE

● _UPPERCASE: string = _LOWERCASE.toUpperCase()

Defined in hash/hash.utils.ts:43


<Const> _abs

● _abs: abs = Math.abs

Defined in hash/hash.utils.ts:52


<Const> _floor

● _floor: floor = Math.floor

Defined in hash/hash.utils.ts:53


<Const> _random

● _random: random = Math.random

Defined in hash/hash.utils.ts:76


<Const> _trunc

● _trunc: trunc = Math.trunc

Defined in hash/hash.utils.ts:77


Functions

_hashString

_hashString(oldHash: number, s: string): number

Defined in hash/hash.utils.ts:35

Parameters:

| Param | Type | | ------ | ------ | | oldHash | number | | s | string |

Returns: number


_hashStringSegment

_hashStringSegment(oldHash: number, start: number, len: number, s: string): number

Defined in hash/hash.utils.ts:27

Parameters:

| Param | Type | | ------ | ------ | | oldHash | number | | start | number | | len | number | | s | string |

Returns: number


_hashToIdentifier

_hashToIdentifier(aHash: number): string

Defined in hash/hash.utils.ts:61

Parameters:

| Param | Type | | ------ | ------ | | aHash | number |

Returns: string


_longCombine

_longCombine(oldHash: number, data: number): number

Defined in hash/hash.utils.ts:22

Parameters:

| Param | Type | | ------ | ------ | | oldHash | number | | data | number |

Returns: number


_longHash

_longHash(): number

Defined in hash/hash.utils.ts:18

Returns: number


_randomIdentifier

_randomIdentifier(): string

Defined in hash/hash.utils.ts:85

Returns: string


ibm-wch-sdk-utils > "http/http.utils"

External module: "http/http.utils"

Index

Interfaces

Type aliases

Variables

Functions

Object literals


Type aliases

Request

Ƭ Request: function

Defined in http/http.utils.ts:49

Type declaration

▸(aUrl: string, aOptions: HttpOptions): Observable<T>

Parameters:

| Param | Type | | ------ | ------ | | aUrl | string | | aOptions | HttpOptions |

Returns: Observable<T>


Variables

<Const> DEFAULT_POLL_TIME

● DEFAULT_POLL_TIME: number = 10 * 1000

Defined in http/http.utils.ts:160


<Const> DEFAULT_POLL_TIME_VARIATION

● DEFAULT_POLL_TIME_VARIATION: 0.15 = 0.15

Defined in http/http.utils.ts:155


<Const> DEFAULT_RETRIES

● DEFAULT_RETRIES: 10 = 10

Defined in http/http.utils.ts:165


<Const> DEFAULT_USE_API

● DEFAULT_USE_API: true = true

Defined in http/http.utils.ts:175


<Const> DEFAULT_USE_BOOTSTRAP

● DEFAULT_USE_BOOTSTRAP: true = true

Defined in http/http.utils.ts:185


<Const> DEFAULT_USE_JSONP

● DEFAULT_USE_JSONP: true = true

Defined in http/http.utils.ts:190


<Const> DEFAULT_USE_LOCAL_STORAGE

● DEFAULT_USE_LOCAL_STORAGE: true = true

Defined in http/http.utils.ts:170


<Const> DEFAULT_USE_POLLING

● DEFAULT_USE_POLLING: true = true

Defined in http/http.utils.ts:195


<Const> DEFAULT_USE_STATIC_RESOURCES

● DEFAULT_USE_STATIC_RESOURCES: true = true

Defined in http/http.utils.ts:180


<Let> ID

● ID: number = 0

Defined in http/http.utils.ts:46


<Const> LOGGER

● LOGGER: "http.utils" = "http.utils"

Defined in http/http.utils.ts:31


<Const> MAX_POLL_TIME

● MAX_POLL_TIME: number = Number.MAX_SAFE_INTEGER

Defined in http/http.utils.ts:199


<Const> MAX_POLL_TIME_VARIATION

● MAX_POLL_TIME_VARIATION: 0.5 = 0.5

Defined in http/http.utils.ts:203


<Const> MIN_POLL_TIME

● MIN_POLL_TIME: 1000 = 1000

Defined in http/http.utils.ts:198


<Const> MIN_POLL_TIME_VARIATION

● MIN_POLL_TIME_VARIATION: 0 = 0

Defined in http/http.utils.ts:202


<Const> _addDebugSource

● _addDebugSource: function = dbgSourceCallback(LOGGER)

Defined in http/http.utils.ts:268

Type declaration

▸(aDbg: any): void

Parameters:

| Param | Type | | ------ | ------ | | aDbg | any |

Returns: void


<Const> _privateUrlJsonCache

● _privateUrlJsonCache: function = createCache<Observable>()

Defined in http/http.utils.ts:234

Type declaration

▸(t1: T1, t2: T2): R

Parameters:

| Param | Type | | ------ | ------ | | t1 | T1 | | t2 | T2 |

Returns: R


<Const> _privateUrlStringCache

● _privateUrlStringCache: function = createCache<Observable>()

Defined in http/http.utils.ts:233

Type declaration

▸(t1: T1, t2: T2): R

Parameters:

| Param | Type | | ------ | ------ | | t1 | T1 | | t2 | T2 |

Returns: R


<Const> _publicUrlJsonCache

● _publicUrlJsonCache: function = createCache<Observable>()

Defined in http/http.utils.ts:230

Type declaration

▸(t1: T1, t2: T2): R

Parameters:

| Param | Type | | ------ | ------ | | t1 | T1 | | t2 | T2 |

Returns: R


<Const> _publicUrlStringCache

● _publicUrlStringCache: function = createCache<Observable>()

Defined in http/http.utils.ts:229

Type declaration

▸(t1: T1, t2: T2): R

Parameters:

| Param | Type | | ------ | ------ | | t1 | T1 | | t2 | T2 |

Returns: R


Functions

_addDebug

_addDebug(aUrl: string, aResult: JsonMap): JsonMap

Defined in http/http.utils.ts:276

Add debugging information to the result

Parameters:

| Param | Type | Description | | ------ | ------ | ------ | | aUrl | string | the URL | | aResult | JsonMap | the result |

Returns: JsonMap


_clip

_clip(aValue: number, aMin: number, aMax: number): number

Defined in http/http.utils.ts:212

Parameters:

| Param | Type | | ------ | ------ | | aValue | number | | aMin | number | | aMax | number |

Returns: number


_createJsonResource

_createJsonResource(aURL: string, aHttpService: HttpService, aWithCredentials: boolean, aTrigger: Observable<any>, aOptions: HttpResourceOptions, aLogger?: Logger): Observable<AnyJson>

Defined in http/http.utils.ts:286

Parameters:

| Param | Type | | ------ | ------ | | aURL | string | | aHttpService | HttpService | | aWithCredentials | boolean | | aTrigger | Observable<any> | | aOptions | HttpResourceOptions | | Optional aLogger | Logger |

Returns: Observable<AnyJson>


_createStringResource

_createStringResource(aURL: string, aHttpService: HttpService, aWithCredentials: boolean, aTrigger: Observable<any>, aOptions: HttpResourceOptions, aLogger?: Logger): Observable<string>

Defined in http/http.utils.ts:313

Parameters:

| Param | Type | | ------ | ------ | | aURL | string | | aHttpService | HttpService | | aWithCredentials | boolean | | aTrigger | Observable<any> | | aOptions | HttpResourceOptions | | Optional aLogger | Logger |

Returns: Observable<string>


_createTimer

_createTimer(aOptions?: HttpResourceOptions): Observable<any>

Defined in http/http.utils.ts:242

Parameters:

| Param | Type | | ------ | ------ | | Optional aOptions | HttpResourceOptions |

Returns: Observable<any>


_getErrorResponse

_getErrorResponse(aError: any): ErrorResponse

Defined in http/http.utils.ts:57

Build an error response object

Parameters:

| Param | Type | Description | | ------ | ------ | ------ | | aError | any | the error |

Returns: ErrorResponse the response


_getJsonResource

_getJsonResource(aURL: string, aHttpService: HttpService, aWithCredentials: boolean, aTrigger: Observable<any>, aOptions?: HttpResourceOptions, aLogger?: Logger): Observable<AnyJson>

Defined in http/http.utils.ts:354

Parameters:

| Param | Type | | ------ | ------ | | aURL | string | | aHttpService | HttpService | | aWithCredentials | boolean | | aTrigger | Observable<any> | | Optional aOptions | HttpResourceOptions | | Optional aLogger | Logger |

Returns: Observable<AnyJson>


_getStringResource

_getStringResource(aURL: string, aHttpService: HttpService, aWithCredentials: boolean, aTrigger: Observable<any>, aOptions: HttpResourceOptions, aLogger?: Logger): Observable<string>

Defined in http/http.utils.ts:336

Parameters:

| Param | Type | | ------ | ------ | | aURL | string | | aHttpService | HttpService | | aWithCredentials | boolean | | aTrigger | Observable<any> | | aOptions | HttpResourceOptions | | Optional aLogger | Logger |

Returns: Observable<string>


_sendJsonRequest

_sendJsonRequest<T>(aUrl: string, aOptions: HttpOptions, aTrigger: Observable<any>, aHttpService: HttpService, aLogger?: Logger): Observable<T>

Defined in http/http.utils.ts:130

Type parameters:

T

Parameters:

| Param | Type | | ------ | ------ | | aUrl | string | | aOptions | HttpOptions | | aTrigger | Observable<any> | | aHttpService | HttpService | | Optional aLogger | Logger |

Returns: Observable<T>


_sendRequest

_sendRequest<T>(aUrl: string, aOptions: HttpOptions, aTrigger: Observable<any>, aRequest: Request<T>, aLogger: Logger): Observable<T>

Defined in http/http.utils.ts:84

Type parameters:

T

Parameters:

| Param | Type | | ------ | ------ | | aUrl | string | | aOptions | HttpOptions | | aTrigger | Observable<any> | | aRequest | Request<T> | | aLogger | Logger |

Returns: Observable<T>


_sendTextRequest

_sendTextRequest(aUrl: string, aOptions: HttpOptions, aTrigger: Observable<any>, aHttpService: HttpService, aLogger?: Logger): Observable<string>

Defined in http/http.utils.ts:146

Parameters:

| Param | Type | | ------ | ------ | | aUrl | string | | aOptions | HttpOptions | | aTrigger | Observable<any> | | aHttpService | HttpService | | Optional aLogger | Logger |

Returns: Observable<string>


Object literals

<Const> DEFAULT_HTTP_RESOURCE_OPTIONS

DEFAULT_HTTP_RESOURCE_OPTIONS: object

Defined in http/http.utils.ts:216

pollTime

● pollTime: number = DEFAULT_POLL_TIME

Defined in http/http.utils.ts:218


pollTimeVariation

● pollTimeVariation: number = DEFAULT_POLL_TIME_VARIATION

Defined in http/http.utils.ts:217


retries

● retries: number = DEFAULT_RETRIES

Defined in http/http.utils.ts:219


useApi

● useApi: true = DEFAULT_USE_API

Defined in http/http.utils.ts:225


useBootstrap

● useBootstrap: true = DEFAULT_USE_BOOTSTRAP

Defined in http/http.utils.ts:221


useJsonP

● useJsonP: true = DEFAULT_USE_JSONP

Defined in http/http.utils.ts:223


useLocalStorage

● useLocalStorage: true = DEFAULT_USE_LOCAL_STORAGE

Defined in http/http.utils.ts:220


usePolling

● usePolling: true = DEFAULT_USE_POLLING

Defined in http/http.utils.ts:224


useStaticResources

● useStaticResources: true = DEFAULT_USE_STATIC_RESOURCES

Defined in http/http.utils.ts:222



ibm-wch-sdk-utils > "idle/idle"

External module: "idle/idle"

Index

Variables


Variables

<Let> _cancelCallback

● _cancelCallback: function

Defined in idle/idle.ts:5

Type declaration

▸(aHandle: number): void

Parameters:

| Param | Type | | ------ | ------ | | aHandle | number |

Returns: void


<Let> _setCallback

● _setCallback: function

Defined in idle/idle.ts:4

Type declaration

▸(aFct: Function): number

Parameters:

| Param | Type | | ------ | ------ | | aFct | Function |

Returns: number


cancelIdleCallback

● cancelIdleCallback: function

Defined in idle/idle.ts:8

Type declaration

▸(aHandle: number): void

Parameters:

| Param | Type | | ------ | ------ | | aHandle | number |

Returns: void


reques