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.0.0 to 0.1.0

32

lib/index.js

@@ -1,1 +0,31 @@

"use strict";
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var FBPromise = function FBPromise() {
return new Promise(function (resolve) {
var FB = window.FB;
if (FB && FB.init) {
resolve(FB);
} else {
window.fbAsyncInit = function () {
resolve(FB);
};
// Load the SDK asynchronously
(function (d, s, id) {
var element = d.getElementsByTagName(s)[0];
var fjs = element;
var js = element;
if (d.getElementById(id)) return;
js = d.createElement(s);js.id = id;
js.src = '//connect.facebook.net/en_US/sdk.js';
fjs.parentNode.insertBefore(js, fjs);
})(document, 'script', 'facebook-jssdk');
}
});
};
exports.default = FBPromise;

4

package.json
{
"name": "facebook-promise",
"version": "0.0.0",
"version": "0.1.0",
"description": "Returns a Promise when the Facebook SDK is ready.",

@@ -41,2 +41,3 @@ "author": "Glenn Reyes <glenn@glennreyes.com>",

"babel-core": "^6.9.1",
"babel-polyfill": "^6.9.1",
"babel-preset-es2015": "^6.9.0",

@@ -52,2 +53,3 @@ "coveralls": "^2.11.9",

"istanbul": "^0.4.3",
"jsdom": "^9.2.1",
"mocha": "^2.5.3",

@@ -54,0 +56,0 @@ "mocha-lcov-reporter": "^1.2.0",

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