@reality.eth/template-generator

0.3.65 • Public • Published

Custom Template

This is a dApp to create custom template by calling the createTemplate(string content) function.

Templates

To avoid duplication and resulting gas fees, parts common to many questions are included in a pre-defined template. The template includes placeholders, and each question only needs to pass in the data necessary to replace the placeholders.

The following templates are built in, one for each question type:

  • 0: {"title": "%s", "type": "bool", "category": "%s", "lang": "%s"}
  • 1: {"title": "%s", "type": "uint", "decimals": 18, "category": "%s", "lang": "%s"}
  • 2: {"title": "%s", "type": "single-select", "outcomes": [%s], "category": "%s", "lang": "%s"}
  • 3: {"title": "%s", "type": "multiple-select", "outcomes": [%s], "category": "%s", "lang": "%s"}
  • 4: {"title": "%s", "type": "datetime", "category": "%s", "lang": "%s"}

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.3.650latest

Version History

VersionDownloads (Last 7 Days)Published
0.3.650
0.3.640
0.3.630
0.3.620
0.3.610
0.3.600
0.3.590
0.3.580
0.3.570
0.3.560
0.3.550
0.3.540
0.3.530
0.3.520
0.3.510
0.3.500
0.3.490
0.3.480
0.3.470
0.3.460
0.3.450
0.3.440
0.3.430
0.3.420
0.3.410
0.3.400
0.3.390
0.3.380
0.3.370
0.3.360
0.3.350
0.3.340
0.3.330
0.3.320
0.3.310
0.3.300
0.3.290
0.3.280
0.3.270
0.3.260
0.3.250
0.3.240
0.3.230
0.3.220
0.3.210
0.3.200
0.3.190
0.3.180
0.3.170
0.3.160
0.3.150
0.3.140
0.3.130
0.3.120
0.3.110
0.3.100
0.3.90
0.3.80
0.3.70
0.3.50
0.3.41
0.3.30
0.3.20
0.3.10

Package Sidebar

Install

npm i @reality.eth/template-generator

Homepage

./

Weekly Downloads

1

Version

0.3.65

License

none

Unpacked Size

264 kB

Total Files

53

Last publish

Collaborators

  • reality.eth