* Format a subPath, return its plain form if it is * a literal string or number. Otherwise prepend the * dynamic indicator (*). * * @param {String} path * @return {String}
(path)
| 2609 | */ |
| 2610 | |
| 2611 | function formatSubPath(path) { |
| 2612 | var trimmed = path.trim(); |
| 2613 | // invalid leading 0 |
| 2614 | if (path.charAt(0) === '0' && isNaN(path)) { |
| 2615 | return false; |
| 2616 | } |
| 2617 | return isLiteral(trimmed) ? stripQuotes(trimmed) : '*' + trimmed; |
| 2618 | } |
| 2619 | |
| 2620 | /** |
| 2621 | * Parse a string path into an array of segments |
no test coverage detected