Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@react-native-firebase/common

Package Overview
Dependencies
Maintainers
2
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-native-firebase/common - npm Package Compare versions

Comparing version 6.0.0-alpha.9 to 6.0.0-alpha.10

lib/Base64.js

37

lib/index.js

@@ -18,17 +18,19 @@ /*

import { Platform } from 'react-native';
import { isString } from './validate';
import Base64 from './Base64';
export * from './path';
export * from './validate';
export Base64 from './Base64';
export promiseDefer from './promiseDefer';
export ReferenceBase from './ReferenceBase';
export function promiseDefer() {
const deferred = {
resolve: null,
reject: null,
};
deferred.promise = new Promise((resolve, reject) => {
deferred.resolve = resolve;
deferred.reject = reject;
});
return deferred;
export function getDataUrlParts(dataUrlString) {
const isBase64 = dataUrlString.includes(`;base64`);
let [mediaType, base64String] = dataUrlString.split(',');
if (!mediaType || !base64String) return { base64String: undefined, mediaType: undefined };
mediaType = mediaType.replace('data:', '').replace(';base64', '');
if (base64String && base64String.includes('%')) base64String = decodeURIComponent(base64String);
if (!isBase64) base64String = Base64.btoa(base64String);
return { base64String, mediaType };
}

@@ -62,4 +64,15 @@

/**
* Remove a trailing forward slash from a string if it exists
*
* @param string
* @returns {*}
*/
export function stripTrailingSlash(string) {
if (!isString(string)) return string;
return string.endsWith('/') ? string.slice(0, -1) : string;
}
export const isIOS = Platform.OS === 'ios';
export const isAndroid = Platform.OS === 'android';
{
"name": "@react-native-firebase/common",
"version": "6.0.0-alpha.9",
"version": "6.0.0-alpha.10",
"author": "Invertase <oss@invertase.io> (http://invertase.io)",

@@ -18,3 +18,3 @@ "description": "React Native Firebase internal common utilities & helpers.",

],
"gitHead": "bfe0f05ab36fdd20df3470a71a9ee8c5a938baf6",
"gitHead": "832835bc23987d794520996b23468870f343ef80",
"publishConfig": {

@@ -21,0 +21,0 @@ "access": "public"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc