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

opentok

Package Overview
Dependencies
Maintainers
2
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

opentok - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

26

lib/opentok.js

@@ -18,2 +18,8 @@ var https = require('https')

// JS constants
var JSObject = "object"
, JSFunction = "function"
, JSString = "string"
, JSNumber = "number"
// OpenTokSession constructor (only used internally)

@@ -155,12 +161,22 @@ var OpenTokSession = function(sessionId){

OpenTokSDK.prototype.create_session = function(ipPassthru, properties, callback){
// Since properties is optional, we need to check the number of parameters passed in
if(!callback){
callback = properties
}
var sessionId
, params = {
partner_id: this.partnerId,
location_hint: ipPassthru
};
// No user specified parameter
if( typeof(ipPassthru) == JSFunction ){
callback = ipPassthru;
}
// location is passed in only
if( typeof(ipPassthru) == JSString && typeof(properties) == JSFunction ){
callback = properties;
}
// property is passed in only
if( typeof(ipPassthru) == JSObject && typeof(properties) == JSFunction ){
callback = properties;
properties = ipPassthru;
}
// property and location passed in, do nothing
for(var p in properties){

@@ -167,0 +183,0 @@ params[p] = properties[p]

2

package.json
{
"name": "opentok",
"description": "OpenTokSDK for node.js",
"version": "0.3.0",
"version": "0.3.1",
"homepage": "https://github.com/bsstoner/opentok",

@@ -6,0 +6,0 @@ "repository": "https://github.com/bsstoner/opentok.git",

@@ -12,3 +12,3 @@ # OpenTokSDK for Node.js

"dependencies" : {
"opentok" : "0.2.x",
"opentok" : "0.3.x",
...

@@ -22,2 +22,8 @@ }

### Require the `opentok` module
Add the following code to the top of any file using the `opentok` module:
var OpenTok = require('opentok');
### API key and API secret

@@ -24,0 +30,0 @@

Sorry, the diff of this file is not supported yet

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