All files / json-random/src/structured templates.ts

100% Statements 4/4
100% Branches 0/0
100% Functions 0/0
100% Lines 4/4

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22      2x   2x                 2x           2x  
import type {Token} from '../string';
import type {StringTemplate, Template} from './types';
 
export const nil: Template = 'nil';
 
export const tokensHelloWorld: Token = [
  'list',
  ['pick', 'hello', 'Hello', 'Halo', 'Hi', 'Hey', 'Greetings', 'Salutations'],
  ['pick', '', ','],
  ' ',
  ['pick', 'world', 'World', 'Earth', 'Globe', 'Planet'],
  ['pick', '', '!'],
];
 
export const tokensObjectKey: Token = [
  'pick',
  ['pick', 'id', 'name', 'type', 'tags', '_id', '.git', '__proto__', ''],
  ['list', ['pick', 'user', 'group', '__system__'], ['pick', '.', ':', '_', '$'], ['pick', 'id', '$namespace', '$']],
];
 
export const str: StringTemplate = ['str', tokensHelloWorld];