Sublime Forum

FakeDataGenerator

#1

So, I was trying to generate a json with some great online tools such github.com/SublimeText/FakeDataGenerator

Now I can generate my fake json with object index with the following code…

"{{index()}}": { "name": "{{name()}}" },

  1. Select text, CTRL+SHIFT+P for the command pallete, type “Fake it!”, select to repeat 3 times, will produce:
  "1": {
    "name": "Trina Friesen" 
  },
  "2": {
    "name": "Mack Koch" 
  },
  "3": {
    "name": "Burney O'Kon" 
  },

Awesome :slight_smile:

See the readme for more information github.com/SublimeText/FakeDataGenerator

Help Wanted / Infinite todo list:

  • Would be very nice to allow generate “code blocks”, such a for loop. For example:

... "{{index()}}": { "tags": {{for i in range(0,4)}} {"tag": "{{word()}}", "date": "{{date()}}", "etc": "life to short"}, {{/for}} ] } ...

Someone wants to take that !??

0 Likes

#2

Whoa, awesome! A quick idea: since there are so many methods, you should add them into command pallete (e.g. fake:name fake:email and so on)

0 Likes

#3

Yes though that… then went to sleep :stuck_out_tongue:, now updated to include the commands.

0 Likes