Function
Static Public Summary | ||
public |
afterStart(PAW_GLOBAL: *, cb: *) |
|
public |
assetsToArray(assets: *): Array Return assets as array |
|
public |
beforeStart(serverConfig: *, PAW_GLOBAL: *, cb: *) |
|
public |
generateMeta(data: *, options: *): Array Return array of meta tags required for the route Pass seo data to the function and get array of meta data |
|
public |
generateStringHash(str: *, namespace: *): string Simple numeric hash of a string, used for non-secure usage only |
|
public |
getTextFromHtml(str: *): string Get text from html string |
|
public |
Check if current script is running in browser or not |
|
public |
loadScript(path: *, attributes: *): Promise Load javascript file by path |
|
public |
Load stylesheet |
|
public |
server(req: *, res: *, next: *, PAW_GLOBAL: *): * Export this a middleware export. |
|
public |
trimTillLastSentence(str: *, length: *): * Process string to get appropriate trimmed data Thus string "Tirth Bodawala" should return "Tirth Bodawala" with length 14 & should return "Tirth" with length 13, first it tries to search for "." and then for " "(space) |
Static Public
public afterStart(PAW_GLOBAL: *, cb: *) source
import {afterStart} from '@pawjs/pawjs/src/server/server.js'
Params:
Name | Type | Attribute | Description |
PAW_GLOBAL | * | ||
cb | * |
|
public assetsToArray(assets: *): Array source
import {assetsToArray} from '@pawjs/pawjs/src/utils/utils.js'
Return assets as array
Params:
Name | Type | Attribute | Description |
assets | * |
public beforeStart(serverConfig: *, PAW_GLOBAL: *, cb: *) source
import {beforeStart} from '@pawjs/pawjs/src/server/server.js'
Params:
Name | Type | Attribute | Description |
serverConfig | * | ||
PAW_GLOBAL | * | ||
cb | * |
|
public generateMeta(data: *, options: *): Array source
import {generateMeta} from '@pawjs/pawjs/src/utils/seo.js'
Return array of meta tags required for the route Pass seo data to the function and get array of meta data
Params:
Name | Type | Attribute | Description |
data | * | ||
options | * |
public generateStringHash(str: *, namespace: *): string source
import {generateStringHash} from '@pawjs/pawjs/src/utils/utils.js'
Simple numeric hash of a string, used for non-secure usage only
Params:
Name | Type | Attribute | Description |
str | * | ||
namespace | * |
public getTextFromHtml(str: *): string source
import {getTextFromHtml} from '@pawjs/pawjs/src/utils/seo.js'
Get text from html string
Params:
Name | Type | Attribute | Description |
str | * |
public isBrowser(): boolean source
import {isBrowser} from '@pawjs/pawjs/src/utils/utils.js'
Check if current script is running in browser or not
public loadScript(path: *, attributes: *): Promise source
import {loadScript} from '@pawjs/pawjs/src/utils/utils.js'
Load javascript file by path
Params:
Name | Type | Attribute | Description |
path | * | ||
attributes | * |
public loadStyle(path: *): Promise source
import {loadStyle} from '@pawjs/pawjs/src/utils/utils.js'
Load stylesheet
Params:
Name | Type | Attribute | Description |
path | * |
public server(req: *, res: *, next: *, PAW_GLOBAL: *): * source
import server from '@pawjs/pawjs/src/server/server.js'
Export this a middleware export.
Params:
Name | Type | Attribute | Description |
req | * | ||
res | * | ||
next | * | ||
PAW_GLOBAL | * |
Return:
* |
public trimTillLastSentence(str: *, length: *): * source
import {trimTillLastSentence} from '@pawjs/pawjs/src/utils/seo.js'
Process string to get appropriate trimmed data Thus string "Tirth Bodawala" should return "Tirth Bodawala" with length 14 & should return "Tirth" with length 13, first it tries to search for "." and then for " "(space)
Params:
Name | Type | Attribute | Description |
str | * | ||
length | * |
Return:
* | String |