LVCanConvToString returns true if a given LValue is a string or number otherwise false.
(v LValue)
| 51 | // LVCanConvToString returns true if a given LValue is a string or number |
| 52 | // otherwise false. |
| 53 | func LVCanConvToString(v LValue) bool { |
| 54 | switch v.(type) { |
| 55 | case LString, LNumber: |
| 56 | return true |
| 57 | default: |
| 58 | return false |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | // LVAsNumber tries to convert a given LValue to a number. |
| 63 | func LVAsNumber(v LValue) LNumber { |
no outgoing calls
no test coverage detected
searching dependent graphs…