Use the Atom package manager, which can be found from the Settings menu or use the command line:
apm install expando-atom
Type Expando syntax and then run the Expando: Expand
command or press SHIFT+ENTER
. Use CTRL+` for expand-and-beautify combination*.
Note: The expand-and-beautify feature is dependent on
atom-beautify
and is only available if you have this package installed.
The following basic types are supported:
string
random string valueint
random integer numberfloat
random float numberdate
random datebool
random boolean value
More advanced types include:
company
random company nameemail
random email addressfname
random first namelname
random last nametel
random telephone number
Separate each type with a comma (,
)
fname,lname,age
Specify custom field aliases by using a colon (:
)
firstName:fname,lastName:lname
Use brackets for child level objects
company,profile:(open:float,close:float)
For object arrays, use astrix (*
)
(fname)*10
For simple arrays, use @
tweet:string,tags@5
The default generation is json
, but xml
and csv
is also supported
items:(string,int)*10=xml
or
(company,price:float)*10=csv