-
Notifications
You must be signed in to change notification settings - Fork 0
HelpCommandExamples
uupaa edited this page Oct 13, 2014
·
7 revisions
Help コマンドの使用例です。
Foo クラスが定義されている Foo.js には Help.js が予め組み込まれています。
以下のいずれかのコマンドで Foo クラスに関する情報を表示します。
> Foo.help
> "Foo".help
> Help(Foo)
> Help("Foo")
> Help("Foo") function Foo(value) { // @arg Number: the value. this._value = value; } GitHub repository: https://github.com/uupaa/Foo.js GitHub wiki page: https://github.com/uupaa/Foo.js/wiki/Foo#wiki-foo Google.search( Foo ): http://www.google.com/search?lr=lang_ja&ie=UTF-8&oe=UTF-8&q=Foo
以下のいずれかのコマンドで Foo.prototype.value に関する情報を表示します。
> Foo.prototype.value.help
> Help(Foo.prototype.value)
> Help("Foo.prototype.value")
> Help("Foo#value")
> Help("Foo#value") function Foo_value() { // @ret Number: get value. return this._value; } GitHub repository: https://github.com/uupaa/Foo.js GitHub wiki page: https://github.com/uupaa/Foo.js/wiki/Foo#wiki-fooprototypevalue Google.search( Foo.prototype.value ): http://www.google.com/search?lr=lang_ja&ie=UTF-8&oe=UTF-8&q=Foo.prototype.value
Help("Foo#isFoo")
は Help("Foo.prototype.isFoo")
を省略したものとして扱われます。
Help.js が組み込まれていない JavaScript コードや、JavaScript の一般的なキーワードも調べることが可能です。
Array や Object などの Native な機能を調べる場合は、 MDN への検索リンクを表示します。
Array.isArray.help
Help("Array.isArray")
> Array.isArray.help function isArray() { [native code] } MDN.search( Array.isArray ): http://www.google.com/search?btnI=I%27m+Feeling+Lucky&lr=lang_ja&ie=UTF-8&oe=UTF-8&q=MDN%20Array.isArray Google.search( Array.isArray ): http://www.google.com/search?lr=lang_ja&ie=UTF-8&oe=UTF-8&q=Array.isArray
Array.prototype.every.help
Help("Array#every")
> Help("Array#every") function every() { [native code] } MDN.search( Array.prototype.every ): http://www.google.com/search?btnI=I%27m+Feeling+Lucky&lr=lang_ja&ie=UTF-8&oe=UTF-8&q=MDN%20Array.prototype.every Google.search( Array.prototype.every ): http://www.google.com/search?lr=lang_ja&ie=UTF-8&oe=UTF-8&q=Array.prototype.every