| Total Complexity | 1 |
| Complexity/F | 1 |
| Lines of Code | 23 |
| Function Count | 1 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | import { create } from 'rung-sdk'; |
||
| 2 | import { String as Text } from 'rung-sdk/dist/types'; |
||
| 3 | import world from './sub/world.js'; |
||
| 4 | |||
| 5 | function main(context) { |
||
| 6 | const { name } = context.params; |
||
| 7 | return { |
||
| 8 | alerts: [{ title: `Hello ${world}! Welcome ${name}!` }] |
||
| 9 | }; |
||
| 10 | } |
||
| 11 | |||
| 12 | export default create(main, { |
||
| 13 | params: { |
||
| 14 | name: { |
||
| 15 | type: Text, |
||
| 16 | description: 'What is your name?', |
||
| 17 | required: true |
||
| 18 | } |
||
| 19 | }, |
||
| 20 | primaryKey: true, |
||
| 21 | title: 'Hello world!', |
||
| 22 | description: 'Hello world example' |
||
| 23 | }); |
||
| 24 |