mirror of
https://github.com/robertkrimen/otto
synced 2025-10-26 20:28:49 +08:00
Add README for underscore
This commit is contained in:
47
underscore/README.markdown
Normal file
47
underscore/README.markdown
Normal file
@@ -0,0 +1,47 @@
|
||||
# underscore
|
||||
--
|
||||
Package underscore contains the source for the underscore utility-belt library for JavaScript.
|
||||
|
||||
import (
|
||||
_ "github.com/robertkrimen/otto/underscore"
|
||||
)
|
||||
// Every Otto runtime will now include underscore
|
||||
|
||||
http://underscorejs.org
|
||||
|
||||
https://github.com/documentcloud/underscore
|
||||
|
||||
By importing this package, you'll automatically load underscore every time you create a new Otto runtime.
|
||||
|
||||
To prevent this behavior, you can do the following:
|
||||
|
||||
import (
|
||||
"github.com/robertkrimen/otto/underscore"
|
||||
)
|
||||
|
||||
func init() {
|
||||
underscore.Disable()
|
||||
}
|
||||
|
||||
## Usage
|
||||
|
||||
#### func Disable
|
||||
|
||||
```go
|
||||
func Disable()
|
||||
```
|
||||
Disable underscore runtime inclusion.
|
||||
|
||||
#### func Enable
|
||||
|
||||
```go
|
||||
func Enable()
|
||||
```
|
||||
Enable underscore runtime inclusion.
|
||||
|
||||
#### func Source
|
||||
|
||||
```go
|
||||
func Source() string
|
||||
```
|
||||
Source returns the underscore source.
|
||||
Reference in New Issue
Block a user