uppercase_pipe.js
1.52 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import { Pipe } from '@angular/core';
import { isBlank } from '../facade/lang';
import { InvalidPipeArgumentError } from './invalid_pipe_argument_error';
/**
* \@ngModule CommonModule
* \@whatItDoes Transforms string to uppercase.
* \@howToUse `expression | uppercase`
* \@description
*
* Converts value into an uppercase string using `String.prototype.toUpperCase()`.
*
* ### Example
*
* {\@example common/pipes/ts/lowerupper_pipe.ts region='LowerUpperPipe'}
*
* \@stable
*/
export var UpperCasePipe = (function () {
function UpperCasePipe() {
}
/**
* @param {?} value
* @return {?}
*/
UpperCasePipe.prototype.transform = function (value) {
if (isBlank(value))
return value;
if (typeof value !== 'string') {
throw new InvalidPipeArgumentError(UpperCasePipe, value);
}
return value.toUpperCase();
};
UpperCasePipe.decorators = [
{ type: Pipe, args: [{ name: 'uppercase' },] },
];
/** @nocollapse */
UpperCasePipe.ctorParameters = function () { return []; };
return UpperCasePipe;
}());
function UpperCasePipe_tsickle_Closure_declarations() {
/** @type {?} */
UpperCasePipe.decorators;
/**
* @nocollapse
* @type {?}
*/
UpperCasePipe.ctorParameters;
}
//# sourceMappingURL=uppercase_pipe.js.map