A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mongodb.github.io/node-mongodb-native/3.6/api/node_modules_bson_lib_bson_symbol.js.html below:

Source: node_modules/bson/lib/bson/symbol.js

Source: node_modules/bson/lib/bson/symbol.js
// Custom inspect property name / symbol.
var inspect = Buffer ? require('util').inspect.custom || 'inspect' : 'inspect';

/**
 * A class representation of the BSON Symbol type.
 *
 * @class
 * @deprecated
 * @param {string} value the string representing the symbol.
 * @return {Symbol}
 */
function Symbol(value) {
  if (!(this instanceof Symbol)) return new Symbol(value);
  this._bsontype = 'Symbol';
  this.value = value;
}

/**
 * Access the wrapped string value.
 *
 * @method
 * @return {String} returns the wrapped string.
 */
Symbol.prototype.valueOf = function() {
  return this.value;
};

/**
 * @ignore
 */
Symbol.prototype.toString = function() {
  return this.value;
};

/**
 * @ignore
 */
Symbol.prototype[inspect] = function() {
  return this.value;
};

/**
 * @ignore
 */
Symbol.prototype.toJSON = function() {
  return this.value;
};

module.exports = Symbol;
module.exports.Symbol = Symbol;

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4