Manual Reference Source Test

Function

Static Public Summary
public

Create a temporary directory for files for the API.

public

Execute a command from within the root folder.

public

padStart(targetLength: number, padString: string): string

Static Public

public async createTemp(path: string): Promise<string, Error> source

import {createTemp} from 'pop-api/src/utils.js'

Create a temporary directory for files for the API.

Params:

NameTypeAttributeDescription
path string
  • nullable: false

The path to the directory to create.

Return:

Promise<string, Error>

The path to the created directory.

Test:

public executeCommand(cmd: string, args: Array<string>): Promise<string, Error> source

import {executeCommand} from 'pop-api/src/utils.js'

Execute a command from within the root folder.

Params:

NameTypeAttributeDescription
cmd string
  • nullable: false

The command to execute.

args Array<string>
  • nullable: true

The arguments passed to the command.

Return:

Promise<string, Error>

The output of the command.

Test:

public padStart(targetLength: number, padString: string): string source

Params:

NameTypeAttributeDescription
targetLength number
padString string

Return:

string

Test: