Skip to content

Commit

Permalink
New feature
Browse files Browse the repository at this point in the history
Adds the ability to search methods in the documentation.
  • Loading branch information
PeterShaggyNoble committed Mar 25, 2019
1 parent b64588a commit dee0d8b
Show file tree
Hide file tree
Showing 12 changed files with 152 additions and 22 deletions.
2 changes: 1 addition & 1 deletion css/default.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/array.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/flags.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"type":"flags","title":"Flags","object":"","intro":["Flags can be entered either in the dedicated field or directly in the input box. Some flags may be combined in the form `-mR`. When a flag runs the programme on each element in the first input and that input is a number then it is first converted to the range `[0,N)` or, if that input is a string, it is first split into an array of characters and rejoined again afterwards."],"flags":{"!":{"description":"Outputs the logical `NOT` of the value returned by the programme; i.e., `true` if falsey, or `false` if truthy.","version":"1.4.5"},"E\"s\"":{"description":"Outputs `s` if the programme throws an error. Considered to be a \"cheating\" flag - use at your own discretion.","version":"1.4.6"},"F\"s\"":{"description":"Outputs `s` if the programme returns a falsey value. Considered to be a \"cheating\" flag - use at your own discretion.","version":"1.4.6"},"N":{"description":"Converts the value returned by the programme to a number. If that value is an array, it is first joined to a string.","version":"1.4.5"},"P":{"description":"Joins the value returned by the programme to a string if that value is an array.","version":"1.4.5"},"Q":{"description":"\"Prettyprints\" the output.","version":"1.4.5"},"R":{"description":"Joins the value returned by the programme to a string with newlinews if that value is an array.","version":"1.4.5"},"S":{"description":"Joins the value returned by the programme to a string with spaces if that value is an array.","version":"1.4.5"},"d":{"description":"Runs the program on each element in the first input, outputting `true` if any returns a truthy value, or `false` if not.","version":"1.4.5"},"e":{"description":"Runs the program on each element in the first input, outputting `true` if all return a truthy value, or `false` if not.","version":"1.4.5"},"f":{"description":"Runs the program on each element in the first input, outputting an array of those that return a truthy value.","version":"1.4.5"},"g":{"description":"If the programme returns a number then outputs its sign; `-1` if negative, `1` if positive, `0` if `0`, or `NaN` if `NaN`.","version":"1.4.5"},"gn":{"description":"If the programme returns a string or an array, outputs the character or element at index `n`, with `n` defaulting to `0`.","version":"1.4.5"},"h":{"description":"If the programme returns a string or an array, outputs the last character or element.","version":"1.4.5"},"m":{"description":"Runs the program on each element in the first input, outputting an array of the results.","version":"1.4.5"},"x":{"description":"Runs the `.x()` method for the relevant type on the value returned by the programme, trimming a string, reducing an array by addition, or rounding a number to the nearest whole number.","version":"1.4.5"},"¡":{"description":"Outputs the value returned by the programme as a boolean; i.e., `true` if truthy, or `false` if falsey.","version":"1.4.5"},"æ":{"description":"Runs the program on each element in the first input, outputting the first to return a truthy value.","version":"1.4.5"}}}
{"type":"flags","title":"Flags","object":"","intro":["Flags can be entered either in the dedicated field in the header or directly in the input box. Some flags may be combined in the form `-mR`. When a flag runs the programme on each element in the first input and that input is a number then it is first converted to the range `[0,N)` or, if that input is a string, it is first split into an array of characters and rejoined again afterwards."],"flags":{"!":{"description":"Outputs the logical `NOT` of the value returned by the programme; i.e., `true` if falsey, or `false` if truthy.","version":"1.4.5"},"E":{"description":"Outputs an empty string if the programme throws an error.","version":"1.4.6"},"E\"s\"":{"description":"Outputs `s` if the programme throws an error. Considered to be a \"cheating\" flag - use at your own discretion.","version":"1.4.6"},"F":{"description":"Outputs an empty string if the programme returns a falsey value.","version":"1.4.6"},"F\"s\"":{"description":"Outputs `s` if the programme returns a falsey value. Considered to be a \"cheating\" flag - use at your own discretion.","version":"1.4.6"},"N":{"description":"Converts the value returned by the programme to a number. If that value is an array, it is first joined to a string.","version":"1.4.5"},"P":{"description":"Joins the value returned by the programme to a string if that value is an array.","version":"1.4.5"},"Q":{"description":"\"Prettyprints\" the output.","version":"1.4.5"},"R":{"description":"Joins the value returned by the programme to a string with newlinews if that value is an array.","version":"1.4.5"},"S":{"description":"Joins the value returned by the programme to a string with spaces if that value is an array.","version":"1.4.5"},"d":{"description":"Runs the program on each element in the first input, outputting `true` if any returns a truthy value, or `false` if not.","version":"1.4.5"},"e":{"description":"Runs the program on each element in the first input, outputting `true` if all return a truthy value, or `false` if not.","version":"1.4.5"},"f":{"description":"Runs the program on each element in the first input, outputting an array of those that return a truthy value.","version":"1.4.5"},"g":{"description":"If the programme returns a number then outputs its sign; `-1` if negative, `1` if positive, `0` if `0`, or `NaN` if `NaN`.","version":"1.4.5"},"gn":{"description":"If the programme returns a string or an array, outputs the character or element at index `n`, with `n` defaulting to `0`.","version":"1.4.5"},"h":{"description":"If the programme returns a string or an array, outputs the last character or element.","version":"1.4.5"},"m":{"description":"Runs the program on each element in the first input, outputting an array of the results.","version":"1.4.5"},"x":{"description":"Runs the `.x()` method for the relevant type on the value returned by the programme, trimming a string, reducing an array by addition, or rounding a number to the nearest whole number.","version":"1.4.5"},"¡":{"description":"Outputs the value returned by the programme as a boolean; i.e., `true` if truthy, or `false` if falsey.","version":"1.4.5"},"æ":{"description":"Runs the program on each element in the first input, outputting the first to return a truthy value.","version":"1.4.5"}}}
2 changes: 1 addition & 1 deletion docs/intro.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<h3 class="ps">Introduction</h3><p class="wip fwm">This 3rd-party interpreter and, in particular, its documentation are a work in progress. The official Japt interpreter with complete documentation can be found at [ethproductions.github.io/japt](https://ethproductions.github.io/japt/).</p><p>This documentation provides an overview of the features, functions &amp; methods of Japt. For more in-depth tutorials, see the [tips for golfing in Japt](https://codegolf.stackexchange.com/q/121253/) on PPCG, join the [Japt chatroom](https://chat.stackexchange.com/rooms/34018/japt) or have a look through some [recent solutions](https://codegolf.stackexchange.com/search?tab=newest&amp;q=Japt).</p><p>Navigate the documentation's sections via the [icon:dots-vertical] icon in the top-right corner.</p><p>Version labels such as [v:1.4.6] are used to indicate which version of Japt a feature or method was added in.</p><p>The following abbreviations are used throughout the documentation, uppercase for objects and lowercase for method arguments:</p><p>[shortcuts:Shortcuts] and method names can be inserted into the code by clicking on them.</p><ol class="columns"><li>`A`: Array</li><li>`B`: Boolean</li><li>`D`: Date</li><li>`F`: Function/Method</li><li>`N`: Number</li><li>`R`: RegExp</li><li>`S`: String</li><li>`X`: Any type</li></ol><h4 class="fwm">Credits</h4><ul><li class="pr">[Japt language](https://github.com/ETHproductions/japt) created and maintained by [ETHproductions](https://github.com/ETHproductions/).</li><li class="pr">This interpreter built and maintained by [Shaggy](https://github.com/PeterShaggyNoble/).</li><li class="pr">Icons by [Material Design Icons](https://materialdesignicons.com/).</li><li class="pr">Compressor's permutation method by [le_m](https://stackoverflow.com/a/37580979/).</li><li class="pr">Thanks to [ETHproductions](https://codegolf.stackexchange.com/users/42545/ethproductions), [ASCII-only](https://codegolf.stackexchange.com/users/39244/ascii-only) and, in particular, [Oliver](https://codegolf.stackexchange.com/users/61613/oliver) for their feedback, suggestions and rigorous testing in the [Japt chatroom](https://chat.stackexchange.com/rooms/34018/japt).</li></ul>
<h3 class="ps">Introduction</h3><p class="wip fwm">This 3rd-party interpreter and, in particular, its documentation are a work in progress. The official Japt interpreter with complete documentation can be found at [ethproductions.github.io/japt](https://ethproductions.github.io/japt/).</p><p>This documentation provides an overview of the features, functions &amp; methods of Japt. For more in-depth tutorials, see the [tips for golfing in Japt](https://codegolf.stackexchange.com/q/121253/) on PPCG, join the [Japt chatroom](https://chat.stackexchange.com/rooms/34018/japt) or have a look through some [recent solutions](https://codegolf.stackexchange.com/search?tab=newest&amp;q=Japt).</p><p>The documentation's sections can be navigated via the [icon:dots-vertical] icon in the top-right corner and the various methods can be searched by clicking on the [icon:magnify] icon.</p><p>Version labels such as [v:1.4.6] are used to indicate which version of Japt a feature or method was added in.</p><p>[shortcuts:Shortcuts] and method names can be inserted into the code by clicking on them.</p><p>The following abbreviations are used throughout the documentation, uppercase for objects and lowercase for method arguments:</p><ol class="columns"><li>`A`: Array</li><li>`B`: Boolean</li><li>`D`: Date</li><li>`F`: Function/Method</li><li>`N`: Number</li><li>`R`: RegExp</li><li>`S`: String</li><li>`X`: Any type</li></ol><h4 class="fwm">Credits</h4><ul><li class="pr">[Japt language](https://github.com/ETHproductions/japt) created and maintained by [ETHproductions](https://github.com/ETHproductions/).</li><li class="pr">This interpreter built and maintained by [Shaggy](https://github.com/PeterShaggyNoble/).</li><li class="pr">Icons by [Material Design Icons](https://materialdesignicons.com/).</li><li class="pr">Compressor's permutation method by [le_m](https://stackoverflow.com/a/37580979/).</li><li class="pr">Thanks to [ETHproductions](https://codegolf.stackexchange.com/users/42545/ethproductions), [ASCII-only](https://codegolf.stackexchange.com/users/39244/ascii-only), [Embodiment of Ignorance](https://codegolf.stackexchange.com/users/84206/embodiment-of-ignorance) and, in particular, [Oliver](https://codegolf.stackexchange.com/users/61613/oliver) for their feedback, suggestions and rigorous testing in the [Japt chatroom](https://chat.stackexchange.com/rooms/34018/japt).</li></ul>
Loading

0 comments on commit dee0d8b

Please sign in to comment.