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

fastly

Package Overview
Dependencies
Maintainers
3
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fastly - npm Package Compare versions

Comparing version 2.1.0 to 2.2.0

23

lib/index.js

@@ -63,3 +63,4 @@ var request = require('request');

Fastly.prototype.purge = function (host, url, callback) {
this.request('POST', '/purge/' + host + url, callback);
var params = { '*': url };
this.request('PURGE', '/', params, callback);
};

@@ -73,4 +74,7 @@

Fastly.prototype.softPurge = function (host, url, callback) {
var params = { 'fastly-soft-purge': 1 };
this.request('POST', '/purge/' + host + url, params, callback);
var params = {
'fastly-soft-purge': 1,
'*': url
};
this.request('PURGE', '/', params, callback);
};

@@ -100,2 +104,15 @@

Fastly.prototype.datacenters = function (callback) {
this.request('GET', '/datacenters', callback);
};
Fastly.prototype.publicIpList = function (callback) {
this.request('GET', '/public-ip-list', callback);
};
Fastly.prototype.edgeCheck = function (checkUrl, callback) {
var url = '/content/edge_check?url=' + encodeURIComponent(checkUrl);
this.request('GET', url, callback);
};
/**

@@ -102,0 +119,0 @@ * Export

5

package.json

@@ -8,3 +8,4 @@ {

"Benjamin E. Coe",
"Yousef Cisco"
"Yousef Cisco",
"Mark Dorison"
],

@@ -14,3 +15,3 @@ "name": "fastly",

"keywords": "fastly, api, client",
"version": "2.1.0",
"version": "2.2.0",
"homepage": "https://github.com/thisandagain/fastly",

@@ -17,0 +18,0 @@ "repository": {

@@ -56,2 +56,17 @@ ## fastly

</tr>
<tr>
<td>datacenters</td>
<td><pre lang="javascript"><code>fastly.datacenters(callback);</code></pre></td>
<td><a href="https://docs.fastly.com/api/tools#datacenter">Link</a></td>
</tr>
<tr>
<td>publicIpList</td>
<td><pre lang="javascript"><code>fastly.publicIpList(callback);</code></pre></td>
<td><a href="https://docs.fastly.com/api/tools#public_ip_list">Link</a></td>
</tr>
<tr>
<td>edgeCheck</td>
<td><pre lang="javascript"><code>fastly.edgeCheck('url', callback);</code></pre></td>
<td><a href="https://docs.fastly.com/api/tools#content">Link</a></td>
</tr>
</table>

@@ -58,0 +73,0 @@

@@ -17,3 +17,6 @@ var test = require('tap').test;

t.type(f.stats, 'function', 'stats method exists');
t.type(f.datacenters, 'function', 'datacenters method exists');
t.type(f.publicIpList, 'function', 'publicIpList method exists');
t.type(f.edgeCheck, 'function', 'edgeCheck method exists');
t.end();
});
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