What's new?
first_match()
to get the first identification - docs
let identifier = lemmeknow::Identifier::default();
let some_result = identifier.first_match("8888888888");
let not_gonna_find = identifier.first_match("a friend for swanandx");
assert_eq!(some_result.unwrap().data.name, "Phone Number");
assert!(not_gonna_find.is_none());
what else? well actually, we got old stuff back!
Breaking Changes
Identify
is nowIdentifier
( makes more sense ).min_rarity
andmax_rarity
are nowf32
instead ofOption<f32>
( let me know if Option was better )
Bug Fix for API users: We used to call build_regexes
inside identify
, which kept building regexes everytime we call identify
making it slow. Instead of this, now regexes are built and stored in lazy static. Which means they are compiled only when first accessed.