Completed
Push — master ( 8c53f9...1d869a )
by Marcelo
33s
created

test/data/hello-world/index.js   A

Complexity

Total Complexity 1
Complexity/F 1

Size

Lines of Code 23
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 0
wmc 1
c 1
b 0
f 0
nc 1
mnd 0
bc 1
fnc 1
dl 0
loc 23
rs 10
bpm 1
cpm 1
noi 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