在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:BjRo/apex开源软件地址:https://github.com/BjRo/apex开源编程语言:Elixir 100.0%开源软件介绍:Apex - Awesome Print for ElixirAwesome Print is an Elixir library that pretty prints Elixir data structures in full color exposing their internal structure with proper indentation. It's a port of part of the functionality of Ruby's awesome awesome_print gem. InstallationIn order to install it via hex, add the reference to this package into the defp deps do
[
{:apex, "~>1.2.1"}
]
end Examplesdata = [false, 42, ~w(forty two), [time: "now"], %{foo: :bar}]
Apex.ap data
# Will output the following:
#[
# [0] false
# [1] 42
# [2] [
# [0] "forty"
# [1] "two"
# ]
# [3] [
# [0] time: "now"
# ]
# [4] %{
# foo: bar
# }
#]
#
#[false, 42, ~w(forty two), [time: "now"], %{foo: :bar}] If the numbering is not for you, you can turn it off via Supported types
Color customizationsYou can customize the use Mix.Config
config :apex, :colors, %{
binary: :red
} This can alternatively also be done at runtime by using the Please note, that you only have to specify the colors you actively want to change here. For
the rest If you want to apply the same settings across multiple elixir projects, you can drop a %{
colors: %{
binary: :yellow,
true: [:green, :bright]
}
} IMPORTANT: the global configuration will get compiled into your PRECEDENCE: When both project specific and global configuration are present, project specific configuration will take precedence. For a full list of all available customizations, please take a look at the result of Awesome def aka adefInspired by @sasajuric's awesome blog post series about macros, Apex also contains an Apex flavored version of his import Apex.AwesomeDef
adef test(data, options \\ []) do
data
end all function invocations print trace outputs in the following format to the group leader (console): iex(1)> Apex.test "foo"
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Function Elixir.Apex.test was called
defined in /Users/bjoernrochel/Coding/Laboratory/apex/lib/apex.ex:12
----------------------------------------------------------------------------------------------------
Parameters:
----------------------------------------------------------------------------------------------------
[
[0] "foo"
[1] []
]
----------------------------------------------------------------------------------------------------
Result:
----------------------------------------------------------------------------------------------------
"foo" Note on Patches/Pull Requests
License(The MIT License) Copyright (c) 2014-2018 Björn Rochel Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
2022-08-15
2022-08-17
2023-10-27
2022-09-23
2022-08-18
请发表评论