Quick function to deep merge using Object.assign()
. Thoughts?
/**
* Simple is object check.
* @param item
* @returns {boolean}
*/
import axios from 'axios'; | |
import firebase from 'react-native-firebase'; | |
axios.interceptors.request.use(async function (config) { | |
const httpMetric = firebase.perf().newHttpMetric(config.url, config.method); | |
config.metadata = { httpMetric }; | |
// add any extra metric attributes if needed | |
// await httpMetric.putAttribute('userId', '12345678'); |
// using ES6 Proxy to let Promises/Observables pretend like they're regular values. | |
// get the mapping function used for async objects | |
let getMapper = (target) => target instanceof Promise ? 'then' : | |
target instanceof Observable ? 'switchMap' : null; | |
// ^ fails if the Observable is in a local namespace e.g. Rx.Observable | |
// bind a value to its object if it's a function | |
let bindFn = (val, obj) => typeof val == 'function' ? val.bind(obj) : val; |
⚠️ NOTE: These changes may not reflect the final plugin changes/API as it's still going through review.
Along with the below changes, the plugin has undergone a quality of life update to better support exceptions thrown. Any Firestore specific errors now return a FirebaseException
, allowing you to directly access the code (e.g. permission-denied
) and message.
Firestore
:
settings()
is now a synchronous setter that accepts a Settings
instance.
document()
is deprecated in favor of doc()
.Notifee.registerForegroundService(notification => { | |
console.warn('Foreground service started.'); | |
return new Promise(resolve => { | |
/** | |
* Cancel the notification and resolve the service promise so the Headless task quits. | |
*/ | |
async function stopService(): Promise<void> { | |
console.warn('Stopping service.'); | |
if (notification?.id) { | |
await Notifee.cancelNotification(notification?.id); |
// REMOTE MAVEN | |
buildscript { | |
repositories { mavenCentral() } | |
dependencies { classpath 'io.invertase.gradle:react-native:+' } | |
} | |
apply plugin: "io.invertase.gradle.settings" | |
// OR --------------- |
{"lastUpload":"2019-09-11T00:17:27.387Z","extensionVersion":"v3.4.2"} |
const lookup = [ | |
0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50a5, 0x60c6, 0x70e7, | |
0x8108, 0x9129, 0xa14a, 0xb16b, 0xc18c, 0xd1ad, 0xe1ce, 0xf1ef, | |
0x1231, 0x0210, 0x3273, 0x2252, 0x52b5, 0x4294, 0x72f7, 0x62d6, | |
0x9339, 0x8318, 0xb37b, 0xa35a, 0xd3bd, 0xc39c, 0xf3ff, 0xe3de, | |
0x2462, 0x3443, 0x0420, 0x1401, 0x64e6, 0x74c7, 0x44a4, 0x5485, | |
0xa56a, 0xb54b, 0x8528, 0x9509, 0xe5ee, 0xf5cf, 0xc5ac, 0xd58d, | |
0x3653, 0x2672, 0x1611, 0x0630, 0x76d7, 0x66f6, 0x5695, 0x46b4, | |
0xb75b, 0xa77a, 0x9719, 0x8738, 0xf7df, 0xe7fe, 0xd79d, 0xc7bc, | |
0x48c4, 0x58e5, 0x6886, 0x78a7, 0x0840, 0x1861, 0x2802, 0x3823, |
@salakar, @ashoat, @indexzero, @swaagie, @3rdeden, and @msluther met today to discuss this. This is the draft proposal written up during that meeting. We plan to iterate on this over the next week and then post it into a new proposal in
react-native-community
.
@salakar, @ashoat, @indexzero, @swaagie, @3rdeden, and @msluther met today to discuss this. This is the draft proposal written up during that meeting. We plan to iterate on this over the next week and then post it into a new proposal in
react-native-community
.A recording of that meeting can be found below in MP4 format.