Sha256: 27b446ef7c0dcc60f576357f187bb9af1a86d6557ab82a144d2390e793dc94db

Contents?: true

Size: 514 Bytes

Versions: 174

Compression:

Stored size: 514 Bytes

Contents

'use strict';

var callBound = require('call-bind/callBound');

var $SymbolValueOf = callBound('Symbol.prototype.valueOf', true);

var Type = require('./Type');

// https://262.ecma-international.org/9.0/#sec-thissymbolvalue

module.exports = function thisSymbolValue(value) {
	if (!$SymbolValueOf) {
		throw new SyntaxError('Symbols are not supported; thisSymbolValue requires that `value` be a Symbol or a Symbol object');
	}
	if (Type(value) === 'Symbol') {
		return value;
	}
	return $SymbolValueOf(value);
};

Version data entries

174 entries across 30 versions & 4 rubygems

Version Path
decidim-0.26.8 packages/eslint-config/node_modules/es-abstract/2020/thisSymbolValue.js
decidim-0.26.8 packages/eslint-config/node_modules/es-abstract/2019/thisSymbolValue.js
groonga-client-model-6.0.0 test/apps/rails6.1.3/node_modules/es-abstract/2020/thisSymbolValue.js
groonga-client-model-6.0.0 test/apps/rails6.0.3.5/node_modules/es-abstract/2018/thisSymbolValue.js
groonga-client-model-6.0.0 test/apps/rails6.0.3.5/node_modules/es-abstract/2019/thisSymbolValue.js
groonga-client-model-6.0.0 test/apps/rails6.0.3.5/node_modules/es-abstract/2020/thisSymbolValue.js
groonga-client-model-6.0.0 test/apps/rails6.1.3/node_modules/es-abstract/2018/thisSymbolValue.js
groonga-client-model-6.0.0 test/apps/rails6.1.3/node_modules/es-abstract/2019/thisSymbolValue.js
ruby2js-4.0.4 lib/tasks/testrails/node_modules/es-abstract/2020/thisSymbolValue.js
ruby2js-4.0.4 lib/tasks/testrails/node_modules/es-abstract/2019/thisSymbolValue.js
ruby2js-4.0.4 lib/tasks/testrails/node_modules/es-abstract/2018/thisSymbolValue.js
ruby2js-4.0.3 lib/tasks/testrails/node_modules/es-abstract/2018/thisSymbolValue.js
ruby2js-4.0.3 lib/tasks/testrails/node_modules/es-abstract/2020/thisSymbolValue.js
ruby2js-4.0.3 lib/tasks/testrails/node_modules/es-abstract/2019/thisSymbolValue.js