Utils

Utility functions for ocrrect

(defined in /src/Utils.coffee:5)
class Utils

Parameters

(None)

Parameters

NameTypeDescription
uriString URI to convert to a cache key

Examples

    Utils.uriToFilename("http://example.org/foo")
    # -> 'example_org_foo'
(defined in /src/Utils.coffee:13)
@uriToFilename : (uri) ->
	uri = uri.replace /[^a-zA-Z0-9]/g, '_'
	uri = uri.replace /_{2,}/g, '_'
	uri = uri.replace /^https?_/, ''
	return uri