How to use the BSONRegExp function from bson
Find comprehensive JavaScript bson.BSONRegExp code examples handpicked from public code repositorys.
GitHub: mongodb-js/compass
176 177 178 179 180 181 182 183 184 185
); return bson.Long.fromBits(...rhs); } emitRegex(ctx, pattern, flags) { return new bson.BSONRegExp(pattern, flags); } emit_array(ctx) { ctx.type = this.Types._array;
128
793
35
3 4 5 6 7 8 9 10 11 12
const bson = require('bson'); const ObjectId = bson.ObjectId; const MinKey = bson.MinKey; const MaxKey = bson.MaxKey; const Binary = bson.Binary; const BSONRegExp = bson.BSONRegExp; const Code = bson.Code; const Timestamp = bson.Timestamp; const Long = bson.Long; const Double = bson.Double;
121
761
0
+ 7 other calls in file
GitHub: loongson/npm-registry
60 61 62 63 64 65 66 67 68 69
/** @type {import('bson').MinKey} */ module.exports.MinKey = BSONJS.MinKey; /** @type {import('bson').ObjectId} */ module.exports.ObjectId = BSONJS.ObjectId; /** @type {import('bson').BSONRegExp} */ module.exports.BSONRegExp = BSONJS.BSONRegExp; /** @type {import('bson').BSONSymbol} */ module.exports.BSONSymbol = BSONJS.BSONSymbol; /** @type {import('bson').Timestamp} */ module.exports.Timestamp = BSONJS.Timestamp;
0
0
0
+ 12 other calls in file
154 155 156 157 158 159 160 161 162 163
a: 12, b: new BSON.Int32(12), c: new BSON.Long(12), d: new BSON.Double(12), e: /[A-Za-z0-9]*/, f: new BSON.BSONRegExp('[A-Za-z0-9]*'), g: undefined }; const expected = BSON.deserialize(BSON.serialize(data, bsonOptions), bsonOptions);
0
0
0
+ 3 other calls in file
bson.ObjectId is the most popular function in bson (1017 examples)