MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / inlineJavaScript

Function inlineJavaScript

rest/config_test.go:1640–1644  ·  view source on GitHub ↗

inlineJavaScript returns a callable function that internally returns given JavaScript source as-is. The callable teardown function returned from this function is nil.

(js string)

Source from the content-addressed store, hash-verified

1638// inlineJavaScript returns a callable function that internally returns given JavaScript
1639// source as-is. The callable teardown function returned from this function is nil.
1640func inlineJavaScript(js string) func() (path string, teardownFn func()) {
1641 return func() (path string, teardownFn func()) {
1642 return js, nil
1643 }
1644}
1645
1646// javaScriptHttpEndpoint returns a callable function to setup an HTTP endpoint that exposes
1647// the given JavaScript source and returns a teardown function to terminate the underlying

Calls

no outgoing calls

Tested by

no test coverage detected