1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
macro_rules! build_camel_case {
(
$(#[doc = $doc:tt])*
$id:ident
) => {
paste::paste! {
with_dollar_sign! {
($d:tt) => {
#[doc(hidden)]
pub use $id as [<$id:camel>];
#[doc(hidden)]
$(#[doc = $doc])*
#[macro_export]
macro_rules! [<$id:camel>] {
($d($d rest:tt)*) => {
$crate::$id!($d($d rest)*)
}
}
}
}
}
}
}
pub use crate::lib_snake::*;
build_camel_case!(
/// More examples:
///
/// ```rust
/// # #[macro_use] extern crate serde_json_lodash;
/// # use serde_json::json;
/// assert_eq!(dropRight!(), json!([]));
/// ```
drop_right
);
macro_rules! build_multi {
[
$($id:ident)+
] => {
$(
build_camel_case!(
///
$id
);
)+
}
}
build_multi![
find_index
find_last_index
flatten_deep
flatten_depth
from_pairs
index_of
last_index_of
pull_all
pull_all_by
pull_all_with
pull_at
to_safe_integer
to_string
to_lower
range_right
stub_array
stub_false
stub_object
stub_string
stub_true
to_path
];
#[cfg(feature = "lazy_static")]
build_multi![unique_id];