strip-import-path-params.js 479 B

123456789101112131415
  1. /**
  2. * @author Toru Nagashima
  3. * @copyright 2016 Toru Nagashima. All rights reserved.
  4. * See LICENSE file in root directory for full license.
  5. */
  6. "use strict"
  7. //------------------------------------------------------------------------------
  8. // Public Interface
  9. //------------------------------------------------------------------------------
  10. module.exports = function stripImportPathParams(path) {
  11. const i = path.indexOf("!")
  12. return i === -1 ? path : path.slice(0, i)
  13. }