diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-03-23 04:45:56 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-03-23 04:45:56 +0800 |
commit | 3133372a6a81c91528afbde58e22b3f9df257d03 (patch) | |
tree | 16778611a22c9fd249a94c88660cb0c6d297ce9b /Godeps/_workspace/src/github.com/robertkrimen/otto/underscore/underscore.go | |
parent | 59eab49cb849ca93b9608763f4842654e8044d0f (diff) | |
parent | 85acdadcfa99ea5c74907029cb63919cc0302c1a (diff) | |
download | go-tangerine-3133372a6a81c91528afbde58e22b3f9df257d03.tar go-tangerine-3133372a6a81c91528afbde58e22b3f9df257d03.tar.gz go-tangerine-3133372a6a81c91528afbde58e22b3f9df257d03.tar.bz2 go-tangerine-3133372a6a81c91528afbde58e22b3f9df257d03.tar.lz go-tangerine-3133372a6a81c91528afbde58e22b3f9df257d03.tar.xz go-tangerine-3133372a6a81c91528afbde58e22b3f9df257d03.tar.zst go-tangerine-3133372a6a81c91528afbde58e22b3f9df257d03.zip |
Merge pull request #536 from zsfelfoldi/develop
using robertkrimen/otto, godeps updated
Diffstat (limited to 'Godeps/_workspace/src/github.com/robertkrimen/otto/underscore/underscore.go')
-rw-r--r-- | Godeps/_workspace/src/github.com/robertkrimen/otto/underscore/underscore.go | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/underscore/underscore.go b/Godeps/_workspace/src/github.com/robertkrimen/otto/underscore/underscore.go new file mode 100644 index 000000000..714b8f3cf --- /dev/null +++ b/Godeps/_workspace/src/github.com/robertkrimen/otto/underscore/underscore.go @@ -0,0 +1,49 @@ +/* +Package underscore contains the source for the JavaScript utility-belt library. + + 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() + } + +*/ +package underscore + +import ( + "github.com/robertkrimen/otto/registry" +) + +var entry *registry.Entry = registry.Register(func() string { + return Source() +}) + +// Enable underscore runtime inclusion. +func Enable() { + entry.Enable() +} + +// Disable underscore runtime inclusion. +func Disable() { + entry.Disable() +} + +// Source returns the underscore source. +func Source() string { + return string(underscore()) +} |