This extension generates random data directly into VS Code. It uses the great ChangeJS library written by Victor Quinn and was inspired by the Random extension for Atom.
This extension can be installed with one the following methods:
- Launch the Command Pallete (Cmd+Shift+P / Ctrl+Shift+P) and type
Extensions: Install Extensions
. Typevscode-random
in the Side Bar search input. Click the install button and reload VS Code. - Click the Extensions icon in the View Bar. Type
vscode-random
in the Side Bar search input. Click the install button and reload VS Code. - Launch VS Code Quick Open (Cmd+P / Ctrl+P). Paste the command
ext install vscode-random
and press Enter.
Launch the Command Pallete (Cmd+Shift+P / Ctrl+Shift+P) and type random
to view all the available data generators. Select one of them and press Enter.
Random values generation is also supported when using multiple editors.
vscodeRandom.contextMenu.enabled
: Enable/disable the context menu for the available data generators (enabled by default).
extension.resetSeed
: Reset seed - Initialize random generation library with a new seed. If no new seed is provided, the library will be reinitialized with the default options.extension.randomByte
: Random byte - Generates an integer between 0 and 255extension.randomShort
: Random short - Generates an integer between 0 and 65535extension.randomInt
: Random integer - Generates an integer between 0 and 4294967295extension.randomLong
: Random long - Generates an integer between 0 and 9007199254740992extension.randomIntCustomRange
: Random integer (custom range) - Generates a random integer within a given custom rangeextension.randomGuid
: Random guid - Generates a guidextension.randomStringCustomLength
: Random string (custom length) - Generates a string with a length defined by user inputextension.randomSampleFromInput
: Random sample from input - Selects a random string from a comma-separated set of valuesextension.randomName
: Random name - Generates a random name (first and last name)extension.randomStreetAddress
: Random street address - Generates a random street addressextension.randomCity
: Random city - Generates a random city nameextension.randomCountryCode
: Random country code - Returns a random country codeextension.randomCountryName
: Random country name - Returns a random country nameextension.randomPhoneNumber
: Random phone number - Generates a random phone numberextension.randomEmail
: Random email - Generates a random email with a random domainextension.randomIP
: Random IP - Generates a random IP addressextension.randomIPv6
: Random IPv6 - Generates a random IPv6 addressextension.randomUrl
: Random Url - Generates a random Urlextension.randomHexColor
: Random hexadecimal color - Generates a random hexadecimal colorextension.randomRgbColor
: Random RGB color - Generates a random RGB colorextension.randomIban
: Random IBAN - Generates a random IBANextension.randomRegEx
: Random Regular Expression - Create random strings that match a given regular expression.
You can check all the changes in the change log here.
Problems with the extension? Suggestions for improvements? Please create an issue or submit a PR on the Github repository. You can also ping me on twitter.
MIT © Jorge Rebocho