interface-forge - v2.5.0
    Preparing search index...

    Class SystemModule

    Generates fake data for many computer systems properties.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    faker: Faker

    Methods

    • Returns a commonly used file extension.

      Returns string

      faker.system.commonFileExt() // 'gif'
      

      3.1.0

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

      Parameters

      • Optionalextension: string

        The file extension to use. Empty string is considered to be not set.

      Returns string

      faker.system.commonFileName() // 'dollar.jpg'
      faker.system.commonFileName('txt') // 'global_borders_wyoming.txt'

      3.1.0

    • Returns a commonly used file type.

      Returns string

      faker.system.commonFileType() // 'audio'
      

      3.1.0

    • Returns a random cron expression.

      Parameters

      • Optionaloptions: { includeNonStandard?: boolean; includeYear?: boolean }

        The optional options to use.

        • OptionalincludeNonStandard?: boolean

          Whether to include a @yearly, @monthly, @daily, etc text labels in the generated expression.

          false
          
        • OptionalincludeYear?: boolean

          Whether to include a year in the generated expression.

          false
          

      Returns string

      faker.system.cron() // '45 23 * * 6'
      faker.system.cron({ includeYear: true }) // '45 23 * * 6 2067'
      faker.system.cron({ includeYear: false }) // '45 23 * * 6'
      faker.system.cron({ includeNonStandard: false }) // '45 23 * * 6'
      faker.system.cron({ includeNonStandard: true }) // '@yearly'

      7.5.0

    • Returns a directory path.

      Returns string

      faker.system.directoryPath() // '/etc/mail'
      

      3.1.0

    • Returns a file extension.

      Parameters

      Returns string

      faker.system.fileExt() // 'emf'
      faker.system.fileExt('application/json') // 'json'

      3.1.0

    • Returns a random file name with extension.

      Parameters

      • Optionaloptions: { extensionCount?: number | { max: number; min: number } }

        An options object.

        • OptionalextensionCount?: number | { max: number; min: number }

          Define how many extensions the file name should have.

          1
          

      Returns string

      faker.system.fileName() // 'faithfully_calculating.u8mdn'
      faker.system.fileName({ extensionCount: 2 }) // 'times_after.swf.ntf'
      faker.system.fileName({ extensionCount: { min: 1, max: 2 } }) // 'jaywalk_like_ill.osfpvg'

      3.1.0

    • Returns a file path.

      Returns string

      faker.system.filePath() // '/usr/local/src/money.dotx'
      

      3.1.0

    • Returns a file type.

      Returns string

      faker.system.fileType() // 'message'
      

      3.1.0

    • Returns a mime-type.

      Returns string

      faker.system.mimeType() // 'video/vnd.vivo'
      

      3.1.0

    • Returns a random network interface.

      Parameters

      • Optionaloptions: {
            interfaceSchema?: "index" | "slot" | "mac" | "pci";
            interfaceType?: "en" | "wl" | "ww";
        }

        The options to use.

        • OptionalinterfaceSchema?: "index" | "slot" | "mac" | "pci"

          The interface schema. Can be one of index, slot, mac, pci.

          faker.helpers.objectKey(['index' | 'slot' | 'mac' | 'pci'])
          
        • OptionalinterfaceType?: "en" | "wl" | "ww"

          The interface type. Can be one of en, wl, ww.

          faker.helpers.arrayElement(['en', 'wl', 'ww'])
          

      Returns string

      faker.system.networkInterface() // 'enp0s3'
      faker.system.networkInterface({ interfaceType: 'wl' }) // 'wlo1'
      faker.system.networkInterface({ interfaceSchema: 'mac' }) // 'enx000c29c00000'
      faker.system.networkInterface({ interfaceType: 'en', interfaceSchema: 'pci' }) // 'enp5s0f1d0'

      7.4.0

    • Returns a semantic version.

      Returns string

      faker.system.semver() // '1.15.2'
      

      3.1.0