whodis-react
Version:
React hooks and components for secure, best practices authentication in seconds
10 lines (9 loc) • 478 B
TypeScript
/**
* detects whether a package can be imported in a universal, and safe, way
*
* note:
* - carefully prevents react-native's metro bundler from throwing an error while proactively fetching all dependencies
* - it specifically requires the import to be within a try-catch to not throw its own error
* - ref: https://github.com/react-native-community/discussions-and-proposals/issues/120
*/
export declare const hasPackageAccessible: (packageName: string) => boolean;