Sha256: fdb1736f2cad42ae93add77ec691c5af7e4467fde504efaeb268dc780d1b74c2

Contents?: true

Size: 1.39 KB

Versions: 31

Compression:

Stored size: 1.39 KB

Contents

/* */ 
"format cjs";
"use strict";

exports.__esModule = true;
exports.internal = internal;
exports.blacklist = blacklist;
exports.whitelist = whitelist;
exports.stage = stage;
exports.optional = optional;
// istanbul ignore next

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

var _lodashCollectionIncludes = require("lodash/collection/includes");

var _lodashCollectionIncludes2 = _interopRequireDefault(_lodashCollectionIncludes);

/**
 * [Please add a description.]
 */

function internal(transformer) {
  if (transformer.key[0] === "_") return true;
}

/**
 * [Please add a description.]
 */

function blacklist(transformer, opts) {
  var blacklist = opts.blacklist;
  if (blacklist.length && _lodashCollectionIncludes2["default"](blacklist, transformer.key)) return false;
}

/**
 * [Please add a description.]
 */

function whitelist(transformer, opts) {
  var whitelist = opts.whitelist;
  if (whitelist) return _lodashCollectionIncludes2["default"](whitelist, transformer.key);
}

/**
 * [Please add a description.]
 */

function stage(transformer, opts) {
  var stage = transformer.metadata.stage;
  if (stage != null && stage >= opts.stage) return true;
}

/**
 * [Please add a description.]
 */

function optional(transformer, opts) {
  if (transformer.metadata.optional && !_lodashCollectionIncludes2["default"](opts.optional, transformer.key)) return false;
}

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
sequenceserver-1.1.0.beta12 public/vendor/npm/babel-core@5.8.23/lib/transformation/transformers/filters.js
sequenceserver-1.1.0.beta11 public/vendor/npm/babel-core@5.8.23/lib/transformation/transformers/filters.js
sequenceserver-1.1.0.beta10 public/vendor/npm/babel-core@5.8.23/lib/transformation/transformers/filters.js
sequenceserver-1.1.0.beta8 public/vendor/npm/babel-core@5.8.23/lib/transformation/transformers/filters.js
sequenceserver-1.1.0.beta7 public/vendor/npm/babel-core@5.8.23/lib/transformation/transformers/filters.js
sequenceserver-1.1.0.beta6 public/vendor/npm/babel-core@5.8.23/lib/transformation/transformers/filters.js
sequenceserver-1.1.0.beta5 public/vendor/npm/babel-core@5.8.23/lib/transformation/transformers/filters.js
sequenceserver-1.1.0.beta4 public/vendor/npm/babel-core@5.8.23/lib/transformation/transformers/filters.js
sequenceserver-1.1.0.beta3 public/vendor/npm/babel-core@5.8.23/lib/transformation/transformers/filters.js
sequenceserver-1.1.0.beta2 public/vendor/npm/babel-core@5.8.23/lib/transformation/transformers/filters.js
sequenceserver-1.1.0.beta public/vendor/npm/babel-core@5.8.23/lib/transformation/transformers/filters.js