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

leek

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

leek - npm Package Compare versions

Comparing version 0.0.16 to 0.0.17

test/adapter-url-test.js

13

lib/leek.js

@@ -6,7 +6,7 @@ 'use strict';

provider = require('./provider'),
request = RSVP.denodeify(require('request')),
getVersions = require('./get-versions'),
md5 = require('./md5'),
extend = require('lodash').extend,
debug = require('debug')('leek');
debug = require('debug')('leek'),
request;

@@ -26,2 +26,3 @@ function Leek(options) {

this.adapterUrls = options.adapterUrls || null;
this.trackingCode = options.trackingCode;

@@ -59,2 +60,6 @@ this.name = options.name;

}
if (request === undefined) {
request = RSVP.denodeify(require('request'));
}

@@ -68,2 +73,6 @@ var params = provider.call(

if (this.adapterUrls) {
params.url = this.adapterUrls[eventType];
}
debug('request %o', params);

@@ -70,0 +79,0 @@ return request(params);

2

package.json
{
"name": "leek",
"description": "GA tracking",
"version": "0.0.16",
"version": "0.0.17",
"keywords": [

@@ -6,0 +6,0 @@ "stats",

@@ -67,2 +67,21 @@ ## Leek

#### Alternative Tracking Endpoints
Passing in an object of adapter URLs will send the data to alternative tracking service.
```javascript
var Leek = require('./lib/leek');
var leek = new Leek({
trackingCode: 'xx-xxxxxxxx-x',
name: 'my-nifty-package',
version: '1.0.1',
adapterUrls: {
appview: 'http://example.com/collect-app',
exception: 'http://example.com/collect-exception',
timing: 'http://example.com/collect-timing',
event: 'http://example.com/collect-event'
}
});
```
#### Constructor Options

@@ -69,0 +88,0 @@

@@ -182,2 +182,2 @@ 'use strict';

});
});
});
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