Sha256: c224d558ca31a0047e004981a78beaa8f1bf1368eb2073858a3c32a22e461440

Contents?: true

Size: 896 Bytes

Versions: 31

Compression:

Stored size: 896 Bytes

Contents

/* */ 
"format amd";
"use strict";

exports.__esModule = true;
exports["default"] = define;
var VISITOR_KEYS = {};
exports.VISITOR_KEYS = VISITOR_KEYS;
var ALIAS_KEYS = {};
exports.ALIAS_KEYS = ALIAS_KEYS;
var BUILDER_KEYS = {};

exports.BUILDER_KEYS = BUILDER_KEYS;
function builderFromArray(arr) {
  var builder = {};
  var _arr = arr;
  for (var _i = 0; _i < _arr.length; _i++) {
    var key = _arr[_i];builder[key] = null;
  }return builder;
}

function define(type) {
  var opts = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];

  opts.visitor = opts.visitor || [];
  opts.aliases = opts.aliases || [];

  if (!opts.builder) opts.builder = builderFromArray(opts.visitor);
  if (Array.isArray(opts.builder)) opts.builder = builderFromArray(opts.builder);

  VISITOR_KEYS[type] = opts.visitor;
  ALIAS_KEYS[type] = opts.aliases;
  BUILDER_KEYS[type] = opts.builder;
}

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
sequenceserver-3.1.3 public/vendor/npm/babel-core@5.8.23/lib/types/definitions/index.js
sequenceserver-3.1.2 public/vendor/npm/babel-core@5.8.23/lib/types/definitions/index.js
sequenceserver-3.1.1 public/vendor/npm/babel-core@5.8.23/lib/types/definitions/index.js
sequenceserver-3.1.0 public/vendor/npm/babel-core@5.8.23/lib/types/definitions/index.js
sequenceserver-3.0.1 public/vendor/npm/babel-core@5.8.23/lib/types/definitions/index.js
sequenceserver-3.0 public/vendor/npm/babel-core@5.8.23/lib/types/definitions/index.js
sequenceserver-2.2.0 public/vendor/npm/babel-core@5.8.23/lib/types/definitions/index.js
sequenceserver-2.1.0 public/vendor/npm/babel-core@5.8.23/lib/types/definitions/index.js
sequenceserver-2.0.0 public/vendor/npm/babel-core@5.8.23/lib/types/definitions/index.js
sequenceserver-2.0.0.rc8 public/vendor/npm/babel-core@5.8.23/lib/types/definitions/index.js
sequenceserver-2.0.0.rc7 public/vendor/npm/babel-core@5.8.23/lib/types/definitions/index.js
sequenceserver-2.0.0.rc6 public/vendor/npm/babel-core@5.8.23/lib/types/definitions/index.js
sequenceserver-2.0.0.rc5 public/vendor/npm/babel-core@5.8.23/lib/types/definitions/index.js
sequenceserver-2.0.0.rc4 public/vendor/npm/babel-core@5.8.23/lib/types/definitions/index.js
sequenceserver-2.0.0.rc3 public/vendor/npm/babel-core@5.8.23/lib/types/definitions/index.js
sequenceserver-2.0.0.rc2 public/vendor/npm/babel-core@5.8.23/lib/types/definitions/index.js
sequenceserver-2.0.0.rc1 public/vendor/npm/babel-core@5.8.23/lib/types/definitions/index.js
sequenceserver-2.0.0.beta4 public/vendor/npm/babel-core@5.8.23/lib/types/definitions/index.js
sequenceserver-2.0.0.beta3 public/vendor/npm/babel-core@5.8.23/lib/types/definitions/index.js
sequenceserver-2.0.0.beta1 public/vendor/npm/babel-core@5.8.23/lib/types/definitions/index.js