Sha256: a34914ea31e729a58e15874a8fee0b6fe88e8bf3bbf25892d05e263c21bd8191

Contents?: true

Size: 1.47 KB

Versions: 17

Compression:

Stored size: 1.47 KB

Contents

var global    = require('./$.global')
  , core      = require('./$.core')
  , hide      = require('./$.hide')
  , redefine  = require('./$.redefine')
  , ctx       = require('./$.ctx')
  , PROTOTYPE = 'prototype';

var $export = function(type, name, source){
  var IS_FORCED = type & $export.F
    , IS_GLOBAL = type & $export.G
    , IS_STATIC = type & $export.S
    , IS_PROTO  = type & $export.P
    , IS_BIND   = type & $export.B
    , target    = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE]
    , exports   = IS_GLOBAL ? core : core[name] || (core[name] = {})
    , expProto  = exports[PROTOTYPE] || (exports[PROTOTYPE] = {})
    , key, own, out, exp;
  if(IS_GLOBAL)source = name;
  for(key in source){
    // contains in native
    own = !IS_FORCED && target && key in target;
    // export native or passed
    out = (own ? target : source)[key];
    // bind timers to global for call from export context
    exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
    // extend global
    if(target && !own)redefine(target, key, out);
    // export
    if(exports[key] != out)hide(exports, key, exp);
    if(IS_PROTO && expProto[key] != out)expProto[key] = out;
  }
};
global.core = core;
// type bitmap
$export.F = 1;  // forced
$export.G = 2;  // global
$export.S = 4;  // static
$export.P = 8;  // proto
$export.B = 16; // bind
$export.W = 32; // wrap
module.exports = $export;

Version data entries

17 entries across 17 versions & 7 rubygems

Version Path
ilog-0.4.1 node_modules/core-js/modules/$.export.js
ilog-0.4.0 node_modules/core-js/modules/$.export.js
ilog-0.3.3 node_modules/core-js/modules/$.export.js
locomotivecms-4.0.0.alpha1 app/javascript/node_modules/fbjs/node_modules/core-js/modules/$.export.js
locomotivecms-3.4.0 app/javascript/node_modules/fbjs/node_modules/core-js/modules/$.export.js
cortex-0.1.3 spec/dummy/node_modules/fbjs/node_modules/core-js/modules/$.export.js
lanes-0.8.0 node_modules/core-js/modules/$.export.js
xcodebuild-helper-1.2.5 externals/ios-sim-master/node_modules/core-js/modules/$.export.js
xcodebuild-helper-1.2.3 externals/ios-sim-master/node_modules/core-js/modules/$.export.js
babel-schmooze-sprockets-0.1.3 node_modules/core-js/modules/$.export.js
babel-schmooze-sprockets-0.1.2 node_modules/core-js/modules/$.export.js
babel-schmooze-sprockets-0.1.1 node_modules/core-js/modules/$.export.js
babel-schmooze-sprockets-0.1.0 node_modules/core-js/modules/$.export.js
babel-schmooze-sprockets-0.1.0.alpha.3 node_modules/core-js/modules/$.export.js
babel-schmooze-sprockets-0.1.0.alpha.2 node_modules/core-js/modules/$.export.js
es6_tilt-0.1.2 test/dummy/node_modules/core-js/modules/$.export.js
es6_tilt-0.1.1 test/dummy/node_modules/core-js/modules/$.export.js