いい感じに

This commit is contained in:
syuilo 2017-03-03 10:31:59 +09:00
parent 6e8ee09a77
commit 8b6c7ef484

View File

@ -31,10 +31,10 @@
/**
* null undefined
*
* nullまたはundefined
* null undefined
*
*
* nullとundefinedを次のように区別していま:
* null undefined :
* null ...
* undefined ...
*
@ -47,9 +47,9 @@
* undefined null
* undefined null
*
* .require()
* () .notUndefined()
* .notNull() 使
* null null
* null nullable :
* const [val, err] = it(x).must.be.a.nullable.string().required().qed();
*/
import * as mongo from 'mongodb';
@ -104,35 +104,15 @@ class QueryCore implements Query {
}
/**
*
* (=undefined)
*/
required() {
if (this.error === null && this.isEmpty) {
this.error = new Error('required');
}
return this;
}
/**
* (=undefined)
*/
notUndefined() {
if (this.error === null && this.isUndefined) {
this.error = new Error('required');
}
return this;
}
/**
* null
*/
notNull() {
if (this.error === null && this.isNull) {
this.error = new Error('required');
}
return this;
}
/**
* (=undefined)
*/