How to use the jsprim.isEmpty function in jsprim

To help you get started, we’ve selected a few jsprim examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github joyent / dragnet / lib / index-query.js View on Github external
IndexQuerier.prototype.toSqlString = function (filter)
{
	var self = this;

	if (mod_jsprim.isEmpty(filter))
		return ('1');

	if (filter['and']) {
		return (filter['and'].map(function (clause) {
			return (sprintf('(%s)', self.toSqlString(clause)));
		}).join(' AND '));
	}

	if (filter['or']) {
		return (filter['or'].map(function (clause) {
			return (sprintf('(%s)', self.toSqlString(clause)));
		}).join(' OR '));
	}

	return (mod_krill.createPredicate(filter).toCStyleString());
};
github joyent / node-krill / lib / krill.js View on Github external
function krillPrimTrivial(pred)
{
	return (mod_jsprim.isEmpty(pred));
}