UNPKG

@microblink/blinkid-react-native

Version:

A small and powerful ID card scanning library. Powered by Microblink (www.microblink.com).

21 lines (19 loc) 574 B
"use strict"; import { StringResult } from "./types.js"; export class BlinkIdUtilities { /** * Helper method for handling different string types, * based on the document information source. */ static handleStringType(raw) { if (typeof raw === "string") { return raw; } // Heuristically assume it's a StringResult if it's an object and matches expected shape if (typeof raw === "object" && raw !== null && "value" in raw) { return new StringResult(raw); } return undefined; } } //# sourceMappingURL=blinkIdUtilities.js.map