8
8
* [ ` notEqual ` ] ( #notequal )
9
9
* [ ` identical ` ] ( #identical )
10
10
* [ ` notIdentical ` ] ( #notidentical )
11
- * [ ` null ` ] ( #null )
12
- * [ ` undefined ` ] ( #undefined )
13
- * [ ` nil ` ] ( #nil )
14
- * [ ` number ` ] ( #number )
15
- * [ ` string ` ] ( #string )
16
- * [ ` function ` ] ( #function )
17
- * [ ` array ` ] ( #array )
18
- * [ ` object ` ] ( #object )
19
- * [ ` defined ` ] ( #defined )
11
+ * [ ` isNull ` ] ( #isnull )
12
+ * [ ` isUndefined ` ] ( #isundefined )
13
+ * [ ` isNil ` ] ( #isnil )
14
+ * [ ` isNumber ` ] ( #isnumber )
15
+ * [ ` isString ` ] ( #isstring )
16
+ * [ ` isFunction ` ] ( #isfunction )
17
+ * [ ` isArray ` ] ( #isarray )
18
+ * [ ` isObject ` ] ( #isobject )
19
+ * [ ` isDefined ` ] ( #isdefined )
20
20
21
21
You can check the module import [ ` here ` ] ( ./modules.md ) .
22
22
@@ -167,7 +167,7 @@ import { IsNotIdenticalPipe } from 'angular-pipes/src/boolean/conditions.pipe';
167
167
```
168
168
169
169
170
- ####null
170
+ ####isnull
171
171
172
172
Returns true if the value if null.
173
173
@@ -180,17 +180,11 @@ import { IsNullPipe } from 'angular-pipes/src/boolean/types.pipe';
180
180
##### Usage
181
181
182
182
``` html
183
- {{ null | null }} <!-- true -->
184
- {{ 1 | null }} <!-- false -->
183
+ {{ null | isNull }} <!-- true -->
184
+ {{ 1 | isNull }} <!-- false -->
185
185
```
186
186
187
- ##### Notes
188
-
189
- I actually need to make sure that ` null ` is not parsed as the JS keyword instead of the pipe.
190
- I'll update this soon.
191
-
192
-
193
- ####undefined
187
+ ####isundefined
194
188
195
189
Returns true if the value if undefined.
196
190
@@ -203,17 +197,11 @@ import { IsUndefinedPipe } from 'angular-pipes/src/boolean/types.pipe';
203
197
##### Usage
204
198
205
199
``` html
206
- {{ a | undefined }} <!-- true if a does not exists -->
207
- {{ 1 | undefined }} <!-- false -->
200
+ {{ a | isUndefined }} <!-- true if a does not exists -->
201
+ {{ 1 | isUndefined }} <!-- false -->
208
202
```
209
203
210
- ##### Notes
211
-
212
- I actually need to make sure that ` undefined ` is not parsed as the JS variable instead of the pipe.
213
- I'll update this soon.
214
-
215
-
216
- ####nil
204
+ ####isnil
217
205
218
206
Returns true if the value if null or undefined.
219
207
@@ -226,13 +214,13 @@ import { IsNilPipe } from 'angular-pipes/src/boolean/types.pipe';
226
214
##### Usage
227
215
228
216
``` html
229
- {{ a | nil }} <!-- true if a does not exists -->
230
- {{ null | nil }} <!-- true -->
231
- {{ 1 | nil }} <!-- false -->
217
+ {{ a | isNil }} <!-- true if a does not exists -->
218
+ {{ null | isNil }} <!-- true -->
219
+ {{ 1 | isNil }} <!-- false -->
232
220
```
233
221
234
222
235
- ####number
223
+ ####isnumber
236
224
237
225
Returns true if the value is a number.
238
226
@@ -245,11 +233,11 @@ import { IsNumberPipe } from 'angular-pipes/src/boolean/types.pipe';
245
233
##### Usage
246
234
247
235
``` html
248
- {{ 'a' | number }} <!-- false -->
249
- {{ 1 | number }} <!-- true -->
236
+ {{ 'a' | isNumber }} <!-- false -->
237
+ {{ 1 | isNumber }} <!-- true -->
250
238
```
251
239
252
- ####string
240
+ ####isstring
253
241
254
242
Returns true if the value is a string.
255
243
@@ -262,12 +250,12 @@ import { IsStringPipe } from 'angular-pipes/src/boolean/types.pipe';
262
250
##### Usage
263
251
264
252
``` html
265
- {{ 'a' | string }} <!-- true -->
266
- {{ 1 | string }} <!-- false -->
253
+ {{ 'a' | isString }} <!-- true -->
254
+ {{ 1 | isString }} <!-- false -->
267
255
```
268
256
269
257
270
- ####function
258
+ ####isfunction
271
259
272
260
Returns true if the value is a function.
273
261
@@ -286,12 +274,12 @@ myFn() {
286
274
```
287
275
288
276
``` html
289
- {{ 'a' | function }} <!-- false -->
290
- {{ myFn | function }} <!-- true -->
277
+ {{ 'a' | isFunction }} <!-- false -->
278
+ {{ myFn | isFunction }} <!-- true -->
291
279
```
292
280
293
281
294
- ####array
282
+ ####isarray
295
283
296
284
Returns true if the value is an array.
297
285
@@ -305,12 +293,12 @@ import { IsArrayPipe } from 'angular-pipes/src/boolean/types.pipe';
305
293
306
294
307
295
``` html
308
- {{ 'a' | array }} <!-- false -->
309
- {{ [] | array }} <!-- true -->
296
+ {{ 'a' | isArray }} <!-- false -->
297
+ {{ [] | isArray }} <!-- true -->
310
298
```
311
299
312
300
313
- ####object
301
+ ####isobject
314
302
315
303
Returns true if the value is an object.
316
304
@@ -324,12 +312,12 @@ import { IsObjectPipe } from 'angular-pipes/src/boolean/types.pipe';
324
312
325
313
326
314
``` html
327
- {{ 'a' | object }} <!-- false -->
328
- {{ {} | object }} <!-- true -->
315
+ {{ 'a' | isObject }} <!-- false -->
316
+ {{ {} | isObject }} <!-- true -->
329
317
```
330
318
331
319
332
- ####defined
320
+ ####isdefined
333
321
334
322
Returns true if the value is defined (nor null nor undefined).
335
323
@@ -343,7 +331,7 @@ import { IsDefinedPipe } from 'angular-pipes/src/boolean/types.pipe';
343
331
344
332
345
333
``` html
346
- {{ 'a' | defined }} <!-- true -->
347
- {{ null | defined }} <!-- false -->
348
- {{ a | defined }} <!-- false if a does not exists -->
334
+ {{ 'a' | isDefined }} <!-- true -->
335
+ {{ null | isDefined }} <!-- false -->
336
+ {{ a | isDefined }} <!-- false if a does not exists -->
349
337
```
0 commit comments