New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

nutritionix

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nutritionix - npm Package Compare versions

Comparing version 0.5.0 to 0.5.1

23

index.js

@@ -37,3 +37,20 @@ 'use strict';

return {
var nutritionix = {
$extend: function (endpoints, mapDefinitionFunction) {
apiMap.map.$extend(mapDefinitionFunction);
_.forEach(endpoints, function (endpoint) {
var endpointRoute = (endpoint.name || endpoint.path).split('.');
var current = nutritionix;
var routeKey = endpointRoute.pop();
_.forEach(endpointRoute, function (routeKey) {
if (!current[routeKey]) {
current[routeKey] = {};
}
current = current[routeKey];
});
current[routeKey] = new apiMap.ApiRequest(endpoint.path, endpoint.payloadKey, endpoint.expectedStatus);
});
},
search: new apiMap.ApiRequest('v2.search', 'json'),

@@ -46,2 +63,4 @@ autocomplete: new apiMap.ApiRequest('v2.autocomplete', 'qs'),

};
return nutritionix;
}

@@ -56,2 +75,2 @@

module.exports = Nutritionix;
module.exports = Nutritionix;

4

lib/ApiMap.js

@@ -11,3 +11,3 @@ 'use strict';

var map = endpoints({
var map = this.map = endpoints({
header: {

@@ -118,2 +118,2 @@ 'X-APP-ID': clientOpts.appId,

module.exports = ApiMap;
module.exports = ApiMap;

@@ -7,2 +7,5 @@ 'use strict';

return {
$extend: function(mapDefinitionFunction){
_.merge(this, mapDefinitionFunction(credentials, url) || {});
},
v2: {

@@ -53,2 +56,2 @@ search: {

};
};
};
{
"name": "nutritionix",
"version": "0.5.0",
"version": "0.5.1",
"description": "Official Nutritionix NodeJS Client Library",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -1,8 +0,6 @@

Official Nutritionix NodeJS Client
Nutritionix API v2.0 Beta NodeJS Client Library
==================================
#### NOTE This is still in beta and the API may change until version 1.0 of this library.
#### NOTE This library is still in beta and subject to change.
#### NOTE `v1` of the API is currently not yet implemented
### Installation

@@ -9,0 +7,0 @@

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