allserver
Version:
Multi-protocol simple RPC server and [optional] client. Boilerplate-less. Opinionated. Minimalistic. DX-first.
10 lines (9 loc) • 321 B
JavaScript
const is = (o, type) => typeof o === type;
module.exports = {
isBoolean: (o) => is(o, "boolean"),
isString: (o) => is(o, "string"),
isFunction: (o) => is(o, "function"),
isObject: (o) => is(o, "object"),
isPlainObject: (o) => o && o.constructor === Object,
uniq: (a) => Array.from(new Set(a)),
};