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

jsonapi-server

Package Overview
Dependencies
Maintainers
5
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsonapi-server - npm Package Compare versions

Comparing version 1.14.0 to 1.15.0

2

CHANGELOG.md

@@ -0,1 +1,3 @@

- 2016-06-28 - v1.15.0
- 2016-06-28 - Scrap sub-millisecond accuracy on metrics
- 2016-06-27 - v1.14.0

@@ -2,0 +4,0 @@ - 2016-06-27 - Enabled application metrics

13

lib/router.js

@@ -113,3 +113,3 @@ /* @flow weak */

res._request = request;
res._startDate = router._getPreciseTime();
res._startDate = new Date();
router.authenticate(request, res, function() {

@@ -189,3 +189,3 @@ return callback(request, resourceConfig, res);

router.sendResponse = function(res, payload, httpCode) {
var timeDiff = router._getTimeDiff(router._getPreciseTime(), res._startDate);
var timeDiff = (new Date()) - res._startDate;
metrics.processResponse(res._request, httpCode, payload, timeDiff);

@@ -198,10 +198,1 @@ res.status(httpCode).json(payload);

};
router._getTimeDiff = function(a, b) {
return parseFloat((a - b).toFixed(2));
};
router._getPreciseTime = function() {
var parts = process.hrtime();
return (((parts[0]*1000)+(parts[1]/1000000))%10000).toFixed(2);
};
{
"name": "jsonapi-server",
"version": "1.14.0",
"version": "1.15.0",
"description": "A config driven NodeJS framework implementing json:api",

@@ -5,0 +5,0 @@ "keywords": [

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