Node-Red configuration
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

esnext.composite-key.js 685B

1234567891011121314151617181920
  1. 'use strict';
  2. var $ = require('../internals/export');
  3. var apply = require('../internals/function-apply');
  4. var getCompositeKeyNode = require('../internals/composite-key');
  5. var getBuiltIn = require('../internals/get-built-in');
  6. var create = require('../internals/object-create');
  7. var $Object = Object;
  8. var initializer = function () {
  9. var freeze = getBuiltIn('Object', 'freeze');
  10. return freeze ? freeze(create(null)) : create(null);
  11. };
  12. // https://github.com/tc39/proposal-richer-keys/tree/master/compositeKey
  13. $({ global: true, forced: true }, {
  14. compositeKey: function compositeKey() {
  15. return apply(getCompositeKeyNode, $Object, arguments).get('object', initializer);
  16. }
  17. });