Files
freeCodeCamp/probot/presolver/node_modules/eslint-plugin-node/lib/util/strip-import-path-params.js
2018-12-05 11:23:55 +05:30

16 lines
479 B
JavaScript

/**
* @author Toru Nagashima
* @copyright 2016 Toru Nagashima. All rights reserved.
* See LICENSE file in root directory for full license.
*/
"use strict"
//------------------------------------------------------------------------------
// Public Interface
//------------------------------------------------------------------------------
module.exports = function stripImportPathParams(path) {
const i = path.indexOf("!")
return i === -1 ? path : path.slice(0, i)
}