Last change
on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
580 bytes
|
Line | |
---|
1 | var $ = require('../internals/export');
|
---|
2 | var getCompositeKeyNode = require('../internals/composite-key');
|
---|
3 | var getBuiltIn = require('../internals/get-built-in');
|
---|
4 | var create = require('../internals/object-create');
|
---|
5 |
|
---|
6 | var initializer = function () {
|
---|
7 | var freeze = getBuiltIn('Object', 'freeze');
|
---|
8 | return freeze ? freeze(create(null)) : create(null);
|
---|
9 | };
|
---|
10 |
|
---|
11 | // https://github.com/tc39/proposal-richer-keys/tree/master/compositeKey
|
---|
12 | $({ global: true }, {
|
---|
13 | compositeKey: function compositeKey() {
|
---|
14 | return getCompositeKeyNode.apply(Object, arguments).get('object', initializer);
|
---|
15 | }
|
---|
16 | });
|
---|
Note:
See
TracBrowser
for help on using the repository browser.