cordova-plugin-networkinterface
Advanced tools
Comparing version 1.0.7 to 1.0.8
{ | ||
"name": "cordova-plugin-networkinterface", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"description": "This plugin allows your application to retrieve the local wifi address.", | ||
"cordova": { | ||
"id": "com.albahra.plugin.networkinterface", | ||
"id": "cordova-plugin-networkinterface", | ||
"platforms": [ | ||
@@ -8,0 +8,0 @@ "ios", |
@@ -10,7 +10,7 @@ Network Interface | ||
<gap:plugin name="com.albahra.plugin.networkinterface" /> | ||
<gap:plugin name="cordova-plugin-networkinterface" source="npm" /> | ||
## Command Line Install | ||
phonegap local plugin add https://github.com/salbahra/NetworkInterfacePlugin | ||
cordova plugin add cordova-plugin-networkinterface | ||
@@ -29,4 +29,2 @@ ## Usage | ||
Copyright (c) 2013 Albahra.com | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
@@ -33,0 +31,0 @@ of this software and associated documentation files (the "Software"), to deal |
@@ -7,5 +7,7 @@ function getIP() { | ||
} | ||
catch (e) { return false; } | ||
catch ( e ) { return false; } | ||
if (!con || con.type == 'cellular') return false; | ||
if ( !con || con.type == "cellular" ) { | ||
return false; | ||
} | ||
return con.defaultGateways[0]; | ||
@@ -15,12 +17,12 @@ } | ||
module.exports = { | ||
getIPAddress: function (success, fail, args, env) { | ||
var result = new PluginResult(args, env), | ||
getIPAddress: function( success, fail, args, env ) { | ||
var result = new PluginResult( args, env ), | ||
ip = getIP(); | ||
if (!ip) { | ||
if ( !ip ) { | ||
result.error(); | ||
} else { | ||
result.ok(ip); | ||
result.ok( ip ); | ||
} | ||
} | ||
}; |
var networkinterface = function() { | ||
}; | ||
networkinterface.getIPAddress = function(success, fail) { | ||
cordova.exec(success, fail, "networkinterface", "getIPAddress", []); | ||
networkinterface.getIPAddress = function( success, fail ) { | ||
cordova.exec( success, fail, "networkinterface", "getIPAddress", [] ); | ||
}; | ||
module.exports = networkinterface; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28
10963
45