Files
sgauthier 6e64e138e2
All checks were successful
Publish To Prod / deploy_and_publish (push) Successful in 35s
planning
2024-10-14 09:15:30 +02:00

19 lines
333 B
JavaScript

'use strict'
module.exports = locate
function locate(value, fromIndex) {
var asterisk = value.indexOf('*', fromIndex)
var underscore = value.indexOf('_', fromIndex)
if (underscore === -1) {
return asterisk
}
if (asterisk === -1) {
return underscore
}
return underscore < asterisk ? underscore : asterisk
}