Skip to content

Casing Value Pipes

These pipes are used to change the casing of the characters.

Note

These pipes are only applicable on string inputs

Uppercase Value Pipe

This Value Pipe sets all the characters in the given value to uppercase.

1
2
3
4
5
const value = 'mY sTrInG';

const pipe = getValuePipe('uppercase');

console.log(pipe(value))

Output

'MY STRING'
1
2
3
4
5
6
7
8
const generator = getValueGenerator('constant-value', {
    value: 'mY sTrInG',
    pipes: [
        'uppercase'
    ]
});

console.log(generator.generate())

Output

'MY STRING'

Tip

This example uses Constant Value Generator. You may want to check it out 😉

Lowercase Value Pipe

This Value Pipe sets all the characters in the given value to lowercase.

1
2
3
4
5
const value = 'mY sTrInG';

const pipe = getValuePipe('lowercase');

console.log(pipe(value))

Output

'my string'
1
2
3
4
5
6
7
8
const generator = getValueGenerator('constant-value', {
    value: 'mY sTrInG',
    pipes: [
        'lowercase'
    ]
});

console.log(generator.generate())

Output

'my string'

Tip

This example uses Constant String Generator. You may want to check it out 😉