Skip to main content

normalize_id

Function normalize_id 

Source
pub fn normalize_id(identifier: &str) -> LinoValue
Expand description

Normalise an identifier so that "1" from a path matches a stored 1.

ยงExamples

use lino_objects_codec::LinoValue;
use lino_rest_api::store::normalize_id;

assert_eq!(normalize_id("1"), LinoValue::Int(1));
assert_eq!(normalize_id("abc"), LinoValue::String("abc".into()));