-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* | ||
* Copyright: (c) 2016. Turtsevich Alexander | ||
* | ||
* Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.html | ||
*/ | ||
|
||
package com.kemsky.filters | ||
{ | ||
import com.kemsky.support.toValue; | ||
|
||
public function empty(val:*):Function | ||
{ | ||
return function (item:*):Boolean | ||
{ | ||
var value:* = toValue(item, val); | ||
return (value as String) == null || (value as String).length == 0; | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* Copyright: (c) 2016. Turtsevich Alexander | ||
* | ||
* Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.html | ||
*/ | ||
|
||
package com.kemsky.filters | ||
{ | ||
import com.kemsky.support.toValue; | ||
|
||
import mx.utils.StringUtil; | ||
|
||
public function trim(val:*):Function | ||
{ | ||
return function (item:*):String | ||
{ | ||
var value:* = toValue(item, val); | ||
if(value is String) | ||
{ | ||
return StringUtil.trim(value); | ||
} | ||
return ""; | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters