The Firebase JS SDK is now in BETA!
This EAP site is no longer maintained. See the official Firebase Documentation site for the latest documentation and information about the Firebase JS SDK.

Home > @firebase/database > refFromURL

refFromURL() function

Returns a Reference representing the location in the Database corresponding to the provided Firebase URL.

An exception is thrown if the URL is not a valid Firebase Database URL or it has a different domain than the current Database instance.

Note that all query parameters (orderBy, limitToLast, etc.) are ignored and are not applied to the returned Reference.

Signature:

export declare function refFromURL(db: FirebaseDatabase, url: string): Reference;

Parameters

Parameter Type Description
db FirebaseDatabase The database instance to obtain a reference for.
url string The Firebase URL at which the returned Reference will point.

Returns:

Reference

A Reference pointing to the provided Firebase URL.