package jscache
import "github.com/hack-pad/go-indexeddb/idb/internal/jscache"
Package jscache caches expensive JavaScript results, like string encoding
Index ¶
Types ¶
type Strings ¶
type Strings struct {
// contains filtered or unexported fields
}
Strings caches encoding strings as safejs.Value's. String encoding today is quite CPU intensive, so caching commonly used strings helps with performance.
func (*Strings) GetProperty ¶
GetProperty retrieves the given object's property, using a cached string value if available. Saves on the performance cost of 2 round trips to JS.
func (*Strings) Value ¶
Value retrieves the safejs.Value for the given string
Source Files ¶
- Version
- v0.3.0
- Published
- Jan 18, 2023
- Platform
- js/wasm
- Imports
- 1 packages
- Last checked
- 4 hours ago –
Tools for package owners.