str_slice function
This commit is contained in:
parent
cba4669d54
commit
581228ada9
3 changed files with 54 additions and 2 deletions
|
|
@ -30,6 +30,14 @@ export function isHasBinding(input: string) {
|
|||
return /#\w+/.test(input)
|
||||
}
|
||||
|
||||
export function isBinding(input: string) {
|
||||
return /^#\w+$/.test(input)
|
||||
}
|
||||
|
||||
export function isNumber(input: string) {
|
||||
return /^[+-]?(?:\d+|\d+\.\d*|\.\d+)(?:[eE][+-]?\d+)?$/.test(input)
|
||||
}
|
||||
|
||||
export function isString(input: string) {
|
||||
return /^'.+'$/.test(input)
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue