You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
264 B

7 years ago
'use strict';
const ow = require('./dist');
7 years ago
7 years ago
const logError = fn => {
try {
fn();
} catch (err) {
console.log(err.message);
}
};
7 years ago
7 years ago
const fn = input => {
ow(input, ow.string.minLength(10));
7 years ago
};
7 years ago
logError(() => {
fn(10);
});
7 years ago
7 years ago
logError(() => {
fn('foo');
});