|
@@ -6,7 +6,7 @@
|
|
-include_lib("nitro/include/event.hrl").
|
|
-include_lib("nitro/include/event.hrl").
|
|
|
|
|
|
|
|
|
|
--export([atom/1, q/1, q/2, qc/1, qc/2, f/1, f/2, coalesce/1,
|
|
|
|
|
|
+-export([atom/1, f/1, f/2, coalesce/1,
|
|
pickle/1, depickle/1, unique_integer/0, temp_id/0,
|
|
pickle/1, depickle/1, unique_integer/0, temp_id/0,
|
|
to_list/1, to_atom/1, to_binary/1, to_integer/1,
|
|
to_list/1, to_atom/1, to_binary/1, to_integer/1,
|
|
join/2, replace/3, indexof/2, indexof/3, append/3, os_env/1, os_env/2,
|
|
join/2, replace/3, indexof/2, indexof/3, append/3, os_env/1, os_env/2,
|
|
@@ -24,20 +24,6 @@ atom(List) when erlang:is_list(List) ->
|
|
atom(Scalar) -> ?MODULE:to_list(Scalar).
|
|
atom(Scalar) -> ?MODULE:to_list(Scalar).
|
|
|
|
|
|
|
|
|
|
-q(Key) -> q(Key, []). %% todo unwrap
|
|
|
|
-q(Key, Def) ->
|
|
|
|
- case erlang:get(Key) of
|
|
|
|
- undefined -> Def;
|
|
|
|
- Val -> Val
|
|
|
|
- end.
|
|
|
|
-
|
|
|
|
-qc(Key) ->
|
|
|
|
- CX = erlang:get(context),
|
|
|
|
- qc(Key, CX#cx.req).
|
|
|
|
-qc(Key, Req) ->
|
|
|
|
- proplists:get_value(?MODULE:to_binary(Key), cowboy_req:parse_qs(Req)).
|
|
|
|
-
|
|
|
|
-
|
|
|
|
%% Convert and Utils API
|
|
%% Convert and Utils API
|
|
|
|
|
|
f(S) -> f(S, []).
|
|
f(S) -> f(S, []).
|