-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
36 lines (32 loc) · 980 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import alfy from 'alfy';
import clipboardy from 'clipboardy';
import transform from './transform.js';
const input = clipboardy.readSync();
const items = [
{
title: 'Single -> Double',
subtitle: 'Transform all single quotes to double quotes',
arg: transform(input, '\'', '"'),
},
{
title: 'Single, Backtick -> Double',
subtitle: 'Transform all single quotes, backticks to double quotes',
arg: transform(transform(input, '\'', '"'), '`', '"')
},
{
title: 'Double -> Single',
subtitle: 'Transform all double quotes to single quotes',
arg: transform(input, '"', '\'')
},
{
title: 'Double, Backtick -> Single',
subtitle: 'Transform all double quotes to single quotes',
arg: transform(transform(input, '"', '\''), '`', '\'')
},
{
title: 'Single, Double -> Backtick Quotes',
subtitle: 'Transform all quotes to backticks',
arg: transform(transform(input, '\'', '`'), '\"', '`')
},
];
alfy.output(items);