jquery cheat
Get Version
0.2.1
→ ‘jquery-cheat’
What
jQuery Cheat provides a command-line interface to the jQuery API.
Installing
sudo gem install jquery-cheat
Demonstration of usage
Main commands
jcheat COMMAND [COMMAND_PREFS] [--name NAME [--precise]] [--module MODULE [--recursive]] [--like STRING] [--params PARAM1[,PARAM2...]] [--no-examples]
(describe|desc) METHOD_NAME [PARAM1, ...]
- the full description of each method matching METHOD_NAME. If you also pass optional PARAMs, the list of matching methods will be filtered to include only methods with those parameters.
--no-examples(-e)suppresses examples from the output- Example:
jcheat desc $ htmlwill return the description of the $ method with an “html” parameter.
list MODULE_NAME
- A list of all methods directly under a specific module. Passing
an optional
-rwill return a list of all methods at any level under the module. - Example:
jcheat list DOM/Traversing
- A list of all methods directly under a specific module. Passing
an optional
(apopros|ap|like) STRING
- A list of all methods whose description contains all of the words in STRING.
- Example:
jcheat like clear fields
named STRING
- A list of all methods named exactly STRING.
- Example:
jcheat named $
(namelike|nl) STRING
- A list of all methods whose names contain STRING.
- Example:
jcheat nl clear
Filters
[--name(-n) NAME [--substrings(-s)]]filters methods by their name. Adding the—precise flag will allow a substring match.
[--module(-m) MODULE [--recursive(-r)]]filters methods by the module they are in. Adding the—recursive flag will check submodules (ex: -m DOM -r will search for methods in DOM, DOM/Traversal, etc.)
[--like(-l) STRING]filters methods by words in their description.
[--params(-o) PARAM1[,PARAM2...]]filters methods by those that contain all of the parameters passed in. Parameters should be passed as a comma-separated list.
License
This code is free to use under the terms of the MIT license.
Contact
Comments are welcome. Send an email to Yehuda Katz.