{"size": 854, "ext": "js", "max_stars_repo_path": "node_modules/babel-plugin-relative-import/lib/index.js", "max_stars_repo_name": "shrutigv/app", "max_stars_repo_stars_event_min_datetime": "2018-06-14T17:10:58.000Z", "max_stars_repo_stars_event_max_datetime": "2018-11-23T01:00:53.000Z", "max_issues_repo_path": "node_modules/babel-plugin-relative-import/lib/index.js", "max_issues_repo_name": "shrutigv/app", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "node_modules/babel-plugin-relative-import/lib/index.js", "max_forks_repo_name": "shrutigv/app", "max_forks_repo_forks_event_min_datetime": "2020-04-12T16:41:30.000Z", "max_forks_repo_forks_event_max_datetime": "2020-04-12T16:41:30.000Z"}
{"max_stars_count": 2, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 30.5, "max_line_length": 133, "alphanum_fraction": 0.6744730679}
'use strict';

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

var _helper = require('./helper');

var _helper2 = _interopRequireDefault(_helper);

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

exports.default = function (_ref) {
  var t = _ref.types;

  return {
    visitor: {
      ImportDeclaration: function ImportDeclaration(path, state) {
        var givenPath = path.node.source.value;
        var rootPathSuffix = state && state.opts && typeof state.opts.rootPathSuffix === 'string' ? state.opts.rootPathSuffix : '';
        if (_helper2.default.startsWith(givenPath, '~/')) {
          path.node.source.value = _helper2.default.transformRelativeToRootPath(givenPath, state.file.opts.filename, rootPathSuffix);
        }
      }
    }
  };
};
//# sourceMappingURL=index.js.map