mirror of
https://github.com/robertkrimen/otto
synced 2025-10-12 20:27:30 +08:00
amend docs on Keys/KeysByParent
This commit is contained in:
parent
03de7d5c8c
commit
9ce459fe6b
8
otto.go
8
otto.go
|
@ -643,9 +643,9 @@ func (self Object) Set(name string, value interface{}) error {
|
|||
}
|
||||
}
|
||||
|
||||
// Get the keys for the object
|
||||
// Keys gets the keys for the given object.
|
||||
//
|
||||
// Equivalent to calling Object.keys on the object
|
||||
// Equivalent to calling Object.keys on the object.
|
||||
func (self Object) Keys() []string {
|
||||
var keys []string
|
||||
self.object.enumerate(false, func(name string) bool {
|
||||
|
@ -655,8 +655,8 @@ func (self Object) Keys() []string {
|
|||
return keys
|
||||
}
|
||||
|
||||
// Get the keys (and those of the parents) for the object, in order of
|
||||
// "closest" to "furthest"
|
||||
// KeysByParent gets the keys (and those of the parents) for the given object,
|
||||
// in order of "closest" to "furthest".
|
||||
func (self Object) KeysByParent() [][]string {
|
||||
var a [][]string
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user