UNPKG
monkey-bus
Version:
latest (0.2.1)
0.2.1
0.2.0
0.1.6
0.1.5
0.1.4
0.1.3
0.1.2
0.1.1
0.1.0
A micro-service bus framework for RabbitMQ
github.com/shurik239/monkey-bus
shurik239/monkey-bus
monkey-bus
/
src
/
filter
/
index.js
15 lines
(12 loc)
•
300 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
module
.
exports
= {
string
:
function
(
str
) {
if
(
typeof
str !==
"string"
) {
throw
new
Error
(
"str should be string"
); }
var
retStr = str.
trim
();
if
(retStr ===
''
) {
throw
new
Error
(
"str is empty"
); }
return
retStr; } };