Sha256: 3e58dec2312d2d57907b0a12e5c90b278112f0b172ab6669c2a0a8fdc09a9089
Contents?: true
Size: 768 Bytes
Versions: 56
Compression:
Stored size: 768 Bytes
Contents
'use strict'; var d = require('d') , isSymbol = require('../is-symbol') , defineProperty = Object.defineProperty; module.exports = function (T, a) { var symbol = T('test'), x = {}; defineProperty(x, symbol, d('foo')); a(x.test, undefined, "Name"); a(x[symbol], 'foo', "Get"); a(x instanceof T, false); a(isSymbol(symbol), true, "Symbol"); a(isSymbol(T.iterator), true, "iterator"); a(isSymbol(T.toStringTag), true, "toStringTag"); x = {}; x[symbol] = 'foo'; if (typeof symbol !== 'symbol') { a.deep(Object.getOwnPropertyDescriptor(x, symbol), { configurable: true, enumerable: false, value: 'foo', writable: true }); } symbol = T.for('marko'); a(isSymbol(symbol), true); a(T.for('marko'), symbol); a(T.keyFor(symbol), 'marko'); };
Version data entries
56 entries across 55 versions & 7 rubygems