vendor: update dependencies with github.com/kardianos/govendor
This commit is contained in:
5
vendor/github.com/robertkrimen/otto/.gitignore
generated
vendored
5
vendor/github.com/robertkrimen/otto/.gitignore
generated
vendored
@ -1,5 +0,0 @@
|
||||
/.test
|
||||
/otto/otto
|
||||
/otto/otto-*
|
||||
/test/test-*.js
|
||||
/test/tester
|
2
vendor/github.com/robertkrimen/otto/README.markdown
generated
vendored
2
vendor/github.com/robertkrimen/otto/README.markdown
generated
vendored
@ -114,7 +114,7 @@ http://godoc.org/github.com/robertkrimen/otto/parser
|
||||
Parse and return an AST
|
||||
|
||||
```go
|
||||
filenamee := "" // A filename is optional
|
||||
filename := "" // A filename is optional
|
||||
src := `
|
||||
// Sample xyzzy example
|
||||
(function(){
|
||||
|
5
vendor/github.com/robertkrimen/otto/builtin.go
generated
vendored
5
vendor/github.com/robertkrimen/otto/builtin.go
generated
vendored
@ -70,7 +70,7 @@ func digitValue(chr rune) int {
|
||||
}
|
||||
|
||||
func builtinGlobal_parseInt(call FunctionCall) Value {
|
||||
input := strings.TrimSpace(call.Argument(0).string())
|
||||
input := strings.Trim(call.Argument(0).string(), builtinString_trim_whitespace)
|
||||
if len(input) == 0 {
|
||||
return NaNValue()
|
||||
}
|
||||
@ -153,7 +153,8 @@ var parseFloat_matchValid = regexp.MustCompile(`[0-9eE\+\-\.]|Infinity`)
|
||||
|
||||
func builtinGlobal_parseFloat(call FunctionCall) Value {
|
||||
// Caveat emptor: This implementation does NOT match the specification
|
||||
input := strings.TrimSpace(call.Argument(0).string())
|
||||
input := strings.Trim(call.Argument(0).string(), builtinString_trim_whitespace)
|
||||
|
||||
if parseFloat_matchBadSpecial.MatchString(input) {
|
||||
return NaNValue()
|
||||
}
|
||||
|
7
vendor/github.com/robertkrimen/otto/builtin_string.go
generated
vendored
7
vendor/github.com/robertkrimen/otto/builtin_string.go
generated
vendored
@ -380,7 +380,12 @@ func builtinString_split(call FunctionCall) Value {
|
||||
split = split[:limit]
|
||||
}
|
||||
|
||||
return call.runtime.toValue(split)
|
||||
valueArray := make([]Value, len(split))
|
||||
for index, value := range split {
|
||||
valueArray[index] = toValue_string(value)
|
||||
}
|
||||
|
||||
return toValue_object(call.runtime.newArrayOf(valueArray))
|
||||
}
|
||||
}
|
||||
|
||||
|
3
vendor/github.com/robertkrimen/otto/value_boolean.go
generated
vendored
3
vendor/github.com/robertkrimen/otto/value_boolean.go
generated
vendored
@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
"math"
|
||||
"reflect"
|
||||
"unicode/utf16"
|
||||
)
|
||||
|
||||
func (value Value) bool() bool {
|
||||
@ -32,6 +33,8 @@ func (value Value) bool() bool {
|
||||
return true
|
||||
case string:
|
||||
return 0 != len(value)
|
||||
case []uint16:
|
||||
return 0 != len(utf16.Decode(value))
|
||||
}
|
||||
if value.IsObject() {
|
||||
return true
|
||||
|
2
vendor/github.com/robertkrimen/otto/value_number.go
generated
vendored
2
vendor/github.com/robertkrimen/otto/value_number.go
generated
vendored
@ -11,7 +11,7 @@ import (
|
||||
var stringToNumberParseInteger = regexp.MustCompile(`^(?:0[xX])`)
|
||||
|
||||
func parseNumber(value string) float64 {
|
||||
value = strings.TrimSpace(value)
|
||||
value = strings.Trim(value, builtinString_trim_whitespace)
|
||||
|
||||
if value == "" {
|
||||
return 0
|
||||
|
Reference in New Issue
Block a user