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

facebook-promise

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

facebook-promise - npm Package Compare versions

Comparing version 0.1.1 to 0.1.3

10

lib/index.js

@@ -6,4 +6,10 @@ 'use strict';

});
var FBPromise = function FBPromise() {
var FBPromise = function FBPromise(opts) {
return new Promise(function (resolve) {
var _opts$language = opts.language;
var language = _opts$language === undefined ? 'en_US' : _opts$language;
var _opts$debug = opts.debug;
var debug = _opts$debug === undefined ? true : _opts$debug;
if (window.FB && window.FB.init) {

@@ -23,3 +29,3 @@ resolve(window.FB);

js = d.createElement(s);js.id = id;
js.src = '//connect.facebook.net/en_US/sdk.js';
js.src = '//connect.facebook.net/' + language + '/sdk' + (debug ? '/debug' : null) + '.js';
fjs.parentNode.insertBefore(js, fjs);

@@ -26,0 +32,0 @@ })(document, 'script', 'facebook-jssdk');

2

package.json
{
"name": "facebook-promise",
"version": "0.1.1",
"version": "0.1.3",
"description": "Loads the Facebook SDK asynchronously and returns it as a Promise.",

@@ -5,0 +5,0 @@ "author": "Glenn Reyes <glenn@glennreyes.com>",

@@ -1,2 +0,7 @@

const FBPromise = () => new Promise((resolve) => {
const FBPromise = (opts) => new Promise((resolve) => {
const {
language = 'en_US',
debug = true,
} = opts;
if (window.FB && window.FB.init) {

@@ -16,3 +21,3 @@ resolve(window.FB);

js = d.createElement(s); js.id = id;
js.src = '//connect.facebook.net/en_US/sdk.js';
js.src = `//connect.facebook.net/${language}/sdk${debug ? '/debug' : null}.js`;
fjs.parentNode.insertBefore(js, fjs);

@@ -19,0 +24,0 @@ })(document, 'script', 'facebook-jssdk');

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