README
mongo-regex-description
This library will create a Mongo-style regex from a "description" (a tuple of an operator and a value). This is useful for building UIs on top of Mongo or Sift $regex
operators.
Also see https://github.com/mixmaxhq/mongo-comparison-ops-description for the numerical counterpart to the library.
Example:
var regExpDescription = require('mongo-regex-description');
var regex = regExpDescription.create({
operator: 'is not',
value: 'my value'
});
// { $not: { $regex: '^my value