Sha256: d5b93cb31fa46ecfe7b6b25165fcf87c2be694e9ff9469a67f79cb3fdaea9277

Contents?: true

Size: 941 Bytes

Versions: 13

Compression:

Stored size: 941 Bytes

Contents

"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.hasMinVersion = hasMinVersion;
exports.typeAnnotationToString = typeAnnotationToString;

var _semver = _interopRequireDefault(require("semver"));

var _core = require("@babel/core");

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

function hasMinVersion(minVersion, runtimeVersion) {
  if (!runtimeVersion) return true;
  if (_semver.default.valid(runtimeVersion)) runtimeVersion = `^${runtimeVersion}`;
  return !_semver.default.intersects(`<${minVersion}`, runtimeVersion) && !_semver.default.intersects(`>=8.0.0`, runtimeVersion);
}

function typeAnnotationToString(node) {
  switch (node.type) {
    case "GenericTypeAnnotation":
      if (_core.types.isIdentifier(node.id, {
        name: "Array"
      })) return "array";
      break;

    case "StringTypeAnnotation":
      return "string";
  }
}

Version data entries

13 entries across 13 versions & 4 rubygems

Version Path
optimacms-0.1.61 spec/dummy/node_modules/@babel/plugin-transform-runtime/lib/helpers.js
tang-0.2.1 spec/tang_app/node_modules/@babel/plugin-transform-runtime/lib/helpers.js
tang-0.2.0 spec/tang_app/node_modules/@babel/plugin-transform-runtime/lib/helpers.js
tang-0.1.0 spec/tang_app/node_modules/@babel/plugin-transform-runtime/lib/helpers.js
tang-0.0.9 spec/tang_app/node_modules/@babel/plugin-transform-runtime/lib/helpers.js
enju_library-0.3.8 spec/dummy/node_modules/@babel/plugin-transform-runtime/lib/helpers.js
condenser-0.3 lib/condenser/processors/node_modules/@babel/plugin-transform-runtime/lib/helpers.js
condenser-0.2 lib/condenser/processors/node_modules/@babel/plugin-transform-runtime/lib/helpers.js
condenser-0.1 lib/condenser/processors/node_modules/@babel/plugin-transform-runtime/lib/helpers.js
condenser-0.0.12 lib/condenser/processors/node_modules/@babel/plugin-transform-runtime/lib/helpers.js
condenser-0.0.11 lib/condenser/processors/node_modules/@babel/plugin-transform-runtime/lib/helpers.js
condenser-0.0.10 lib/condenser/processors/node_modules/@babel/plugin-transform-runtime/lib/helpers.js
condenser-0.0.9 lib/condenser/processors/node_modules/@babel/plugin-transform-runtime/lib/helpers.js