Sha256: 81c49cab30eff461276c41111401e95ac54bafa20b4f93e48703732ddd29cc77
Contents?: true
Size: 1017 Bytes
Versions: 2
Compression:
Stored size: 1017 Bytes
Contents
# UNPACKERS SPECIFICATIONS Nothing very difficult: an unpacker is a submodule placed in the directory where this file was found. Each unpacker must define three symbols: * `PRIORITY` : integer number expressing the priority in applying this unpacker. Lower number means higher priority. Makes sense only if a source file has been packed with more than one packer. * `detect(source)` : returns `True` if source is packed, otherwise, `False`. * `unpack(source)` : takes a `source` string and unpacks it. Must always return valid JavaScript. That is to say, your code should look like: ``` if detect(source): return do_your_fancy_things_with(source) else: return source ``` *You can safely define any other symbol in your module, as it will be ignored.* `__init__` code will automatically load new unpackers, without any further step to be accomplished. Simply drop it in this directory.
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
js-beautify-0.1.8 | js-beautify-copy/python/jsbeautifier/unpackers/README.specs.mkd |
js-beautify-0.1.7 | js-beautify-copy/python/jsbeautifier/unpackers/README.specs.mkd |