Skip to main content

System

Generates fake data for many computer systems properties.


commonFileExt

Returns a commonly used file extension.

Returns: string

Examples

{{$system.commonFileExt}}  // 'wav'

commonFileName

Returns a random file name with a given extension or a commonly used extension.

Parameters

NameTypeDefaultDescription
extstringExtension. Empty string is considered to be not set.

Returns: string

Examples

{{$system.commonFileName}}  // 'through.gif'

{{$system.commonFileName(ext='txt')}} // 'um_vacantly_repeatedly.txt'

commonFileType

Returns a commonly used file type.

Returns: string

Examples

{{$system.commonFileType}}  // 'text'

cron

Returns a random cron expression.

Parameters

NameTypeDefaultDescription
includeNonStandardbooleanfalseWhether to include a @yearly, @monthly, @daily, etc text labels in the generated expression.
includeYearbooleanfalseWhether to include a year in the generated expression.

Returns: string

Examples

{{$system.cron}} // '* 7 ? 7 THU'

{{$system.cron(includeYear=true)}} // '57 * * 2 ? 2070'

{{$system.cron(includeNonStandard=true)}} // ‘* * ? 1 *’

directoryPath

Returns a directory path.

Returns: string

Examples

{{$system.directoryPath}} // '/usr/bin'

fileExt

Returns a file extension.

Parameters

NameTypeDefaultDescription
mimeTypestringfalseValid mime-type

Returns: string

Examples

{{$system.fileExt}} // 'doc'

{{$system.fileExt(mimeType='application/json')}} // 'json’

fileName

Returns a random file name with extension.

Parameters

NameTypeDefaultDescription
extensionCountnumber1Define how many extensions the file name should have.
minnumber1The minimum number extensions the file name should have.
maxnumber1The maximum number extensions the file name should have.

Returns: string

Examples

{{$system.fileName}} // 'battle.jpeg'

{{$system.fileName(extensionCount=2)}} // 'even_black.rtf.rng’

filePath

Returns a file path.

Returns: string

Examples

{{$system.filePath}} // '/net/oval_specific_unselfish.svgz'

fileType

Returns a file type.

Returns: string

Examples

{{$system.fileType}}  // 'message'

mimeType

Returns a mime-type.

Returns: string

Examples

{{$system.mimeType}}  // 'application/zip'

networkInterface

Returns a random network interface.

Parameters

NameTypeDefaultDescription
interfaceSchema'index' | 'slot' | 'mac' | 'pci'The interface schema. Can be one of index, slot, mac, pci.
interfaceType'en' | 'wl' | 'ww'{{$helpers.arrayElement(['wl','en','ww'])}}The interface type. Can be one of en, wl, ww.

Returns: string

Examples

{{$system.networkInterface}} // 'wlx26bf88459fdf'

{{$system.networkInterface(interfaceType='wl')}} // 'wlx5a1f70bd93bb'

{{$system.networkInterface(interfaceSchema='mac')}} // ‘wwxa4403d778514’

{{$system.networkInterface(interfaceType='en',interfaceSchema='pci')}} // ‘P2enp3s5f0’

semver

Returns a semantic version.

Returns: string

Examples

{{$system.semver}}  // '8.0.3'