Root namespace for GPF type documentation.
Note that this symbol does not exist and is used only for documentation purposes.
- Since:
-
- 0.1.5
Classes
Type Definitions
-
contextResult
-
Result of gpf.context call, depends on the specified path
- when not specified, it returns the current host main context object
- when
"gpf"
, it always returns the GPF object - when it leads to nothing,
undefined
is returned
Type:
- *
- Since:
-
- 0.1.5
-
csvParserOptions
-
- Since:
-
- 0.2.3
Properties:
Name Type Argument Default Description header
String <optional>
Header line: if not specified, the first write of the input stream becomes the header
separator
String <optional>
Column separator, detected from the header line if not specified (allowed characters are ";" "," and "\t")
quote
String <optional>
"\"" Quote sign: introduces an escaped value in which quotes, separator and carriage returns are allowed. Consequently, the value may stand on several lines
newLine
String <optional>
"\n" New line: each input stream write is considered as a separate line. If a quoted value stands on several lines, this character is used to represents every new line
-
fileStorageInfo
-
- Since:
-
- 0.1.9
Properties:
Name Type Description type
gpf.fs.types See gpf.fs.types
fileName
String file name only
filePath
String full path to the file
size
Number Size of the object (if relevant)
createdDateTime
Date modifiedDateTime
Date -
filterAnd
-
Filter AND specification
- Since:
-
- 0.1.9
- See:
Properties:
Name Type Description and
Array.<gpf.typedef.filterItem> List of items to and, returns the first falsy value or the last truthy value
-
filterEq
-
Filter equal specification
- Since:
-
- 0.1.9
- See:
Properties:
Name Type Description eq
Array.<gpf.typedef.filterItem> List of items to compare, returns true if all values are strictly equal
-
filterFunc(data)
-
Filtering function
Parameters:
Name Type Description data
* Data to filter
- Since:
-
- 0.2.4
Returns:
truthy / falsy value indicating if the data matches the filter
- Type
- Boolean
-
filterGt
-
Filter greater than specification
- Since:
-
- 0.1.9
- See:
Properties:
Name Type Description gt
Array.<gpf.typedef.filterItem> List of items to compare
-
filterGte
-
Filter greater than or equal specification
- Since:
-
- 0.1.9
- See:
Properties:
Name Type Description gte
Array.<gpf.typedef.filterItem> List of items to compare
-
filterItem
-
Filter specification
Type:
- gpf.typedef.filterProperty | gpf.typedef.filterEq | gpf.typedef.filterNe | gpf.typedef.filterLt | gpf.typedef.filterLte | gpf.typedef.filterGt | gpf.typedef.filterGte | gpf.typedef.filterNot | gpf.typedef.filterLike | gpf.typedef.filterOr | gpf.typedef.filterAnd
- Since:
-
- 0.1.9
- See:
-
filterLike
-
Filter like specification
- Since:
-
- 0.1.9
- See:
Properties:
Name Type Argument Description like
gpf.typedef.filterItem Item
regexp
String Regular expression specification
group
Number <optional>
If the regular expression contains capturing group, this members can be used to return the group by index (1-based)
-
filterLt
-
Filter lower than specification
- Since:
-
- 0.1.9
- See:
Properties:
Name Type Description lt
Array.<gpf.typedef.filterItem> List of items to compare
-
filterLte
-
Filter lower than or equal specification
- Since:
-
- 0.1.9
- See:
Properties:
Name Type Description lte
Array.<gpf.typedef.filterItem> List of items to compare
-
filterNe
-
Filter not equal specification
- Since:
-
- 0.1.9
- See:
Properties:
Name Type Description eq
Array.<gpf.typedef.filterItem> List of items to compare, returns true if all values are strictly different
-
filterNot
-
Filter not specification
- Since:
-
- 0.1.9
- See:
Properties:
Name Type Description not
gpf.typedef.filterItem Item to negate, returns true if the item is falsy, false otherwise
-
filterOr
-
Filter OR specification
- Since:
-
- 0.1.9
- See:
Properties:
Name Type Description or
Array.<gpf.typedef.filterItem> List of items to or, returns the first truthy value or the last falsy value
-
filterProperty
-
Filter property read specification
- Since:
-
- 0.1.9
- See:
Properties:
Name Type Description property
String Property name to read
-
forEachCallback(value, index, container)
-
Callback function executed on each array / dictionary item
Parameters:
Name Type Description value
* The current item
index
String The index of the current item
container
Object The container currently being enumerated (array or dictionary)
- Since:
-
- 0.1.5
Returns:
returned value
- Type
- *
-
httpRequestResponse
-
HTTP request response
- Since:
-
- 0.2.1
- See:
Properties:
Name Type Description status
int HTTP status
headers
Object HTTP response headers
responseText
String Response Text
-
httpRequestSettings
-
HTTP request settings
- Since:
-
- 0.2.1
- See:
Properties:
Name Type Argument Default Description method
gpf.http.methods <optional>
gpf.http.methods.get HTTP method. Custom verbs (use any string) may be supported depending on the host (see Compatibility layer).
url
String URL to submit the request to
headers
Object <optional>
Request headers
data
String <optional>
Request data, valid only for gpf.http.methods.post and gpf.http.methods.put
-
mapFunc(data)
-
Mapping function
Parameters:
Name Type Description data
* Data to map
- Since:
-
- 0.2.5
Returns:
Mapped data (might be the received parameter)
- Type
- *
-
mockedRequest
-
Definition of a mocked request
- Since:
-
- 0.2.2
Properties:
Name Type Description method
gpf.http.methods HTTP method to mock
url
RegExp Regular expression matching the URL to mock
response
gpf.typedef.mockedResponseCallback Function that generates response when mocking applies
-
mockedRequestID
-
Mocked request identifier
- Since:
-
- 0.2.2
-
mockedResponseCallback(HTTP, captured)
-
Mocked response callback
Parameters:
Name Type Argument Description HTTP
gpf.typedef.httpRequestSettings request settings
captured
String <repeatable>
Regular expression capturing group values
- Since:
-
- 0.2.2
Returns:
- Type
- Promise.<gpf.typedef.httpRequestResponse> | undefined
-
regExpForEachCallback(match, string)
-
Callback function executed on each regular expression match
Parameters:
Name Type Description match
Array The current match
string
String The string that is currently being matched
- Since:
-
- 0.2.1
-
requireOptions
-
- Since:
-
- 0.2.2
Properties:
Name Type Argument Default Description base
String <optional>
Base path used to resolve names
cache
Object <optional>
Inject names into the require cache
clearCache
Boolean <optional>
false When set, the require cache is first cleared
preload
Object <optional>
Inject names into the loading cache
preprocess
gpf.typedef.requirePreprocessFunc <optional>
Resource preprocessor
-
requirePreprocessFunc(resource)
-
Resource preprocessing function. It enables changing the resource content and / or the resource type before it is evaluated.
Parameters:
Name Type Description resource
gpf.typedef.requireResource Resource definition
- Since:
-
- 0.2.9
Returns:
- Type
- Promise.<gpf.typedef.requireResource>
-
requireResource
-
- Since:
-
- 0.2.9
Properties:
Name Type Description name
String Resource resolved name
content
String Resource content
type
String Resource type (extension, for instance: ".js")
-
serialConverter(value, property, member)
-
Converter function executed upen property value serialization
Parameters:
Name Type Description value
* The value to convert
property
gpf.typedef.serializableProperty The property definition
member
String The object member
- Since:
-
- 0.2.8
Returns:
converter value
- Type
- *
-
serializableProperty
-
Serializable property specification
- Since:
-
- 0.2.8
- See:
Properties:
Name Type Argument Default Description name
String Name of the property
type
gpf.serial.types <optional>
gpf.serial.types.string Type of the property
required
Boolean <optional>
false Property must have a value
readOnly
Boolean <optional>
Property is read only. When undefined, and if the host supports [Object.getOwnPropertyDescriptors](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ Object/getOwnPropertyDescriptors), the framework will check if the property can be set. This property is resolved when used in the gpf.typedef.serialConverter.
-
sortItem
-
Property sorting specification
- Since:
-
- 0.1.9
Properties:
Name Type Argument Default Description property
String Name of the property to sort by
type
String <optional>
"number" Property type, only allowed values are "number" and "string"
ascending
Boolean <optional>
true Descending if false
-
tagChild
-
Tag generation function child specification. When string, a text node is created.
- Since:
-
- 0.2.1
- See:
Properties:
Type Description String | gpf.typedef.Tag -
tagChildren
-
Tag generation function children specification
- Since:
-
- 0.2.1
- See:
Properties:
Type Description gpf.typedef.tagChild | Array.<gpf.typedef.tagChild> -
tagFunc( [attributes] [, children])
-
Tag generation function, it accepts up to two parameters:
- When no parameter is passed, an empty node is created
- If the first parameter is a literal object (see gpf.isLiteralObject), its properties are used to define the node attributes
- Otherwise, the second (or first if not a literal object) is used to define children that will be appended to this tag
Parameters:
Name Type Argument Description attributes
Object | gpf.typedef.tagChildren <optional>
When a literal object is passed, it is interpreted as an attribute dictionary. The attribute name may contain the xlink namespace prefix.
children
gpf.typedef.tagChildren <optional>
List of children
- Since:
-
- 0.2.1
- See:
Returns:
Tag object
- Type
- gpf.typedef.Tag