Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
A third-party API for accessing MyFitnessPal diary data.
For it to work, you should set your diary privacy status to "public".
npm install mfp --save
var mfp = require('mfp');
Asynchronously scrapes nutrient data from a user's food diary on a given date.
String
String
with format YYYY-MM-DDString
or Array
String
'all', which will fetch data for all nutrient fieldsArray
of nutrient field names, each a String
. Allowable field names:
Function
data
, which will be an Object
whose keys are the nutrient field names and values are each a Number
, as well as the date.
Eg. { 'date': '2014-10-05', 'calories': 2078, 'carbs': 98, 'fat': 119, 'saturated fat': 35, 'protein': 153 }
Example 1:
mfp.fetchSingleDate('username', '2014-09-15', 'all', function(data){
console.log(data);
});
Example 2:
mfp.fetchSingleDate('username', '2014-09-15', ['calories', 'protein', 'carbs', 'fat'], function(data){
console.log(data);
});
Asynchronously scrapes nutrient data from a user's food diary on a given date.
String
String
with format YYYY-MM-DDString
with format YYYY-MM-DDString
or Array
String
'all', which will fetch data for all nutrient fieldsArray
of nutrient field names, each a String
. Allowable field names:
Function
data
, which will be an Object
with the following format:
Eg.{ username: 'exampleUser',
data: [
{ 'date': '2014-07-05', 'calories': 2078, 'carbs': 98, 'fat': 119, 'saturated fat': 35, 'protein': 153 },
{ 'date': '2014-07-06', 'calories': 2078, 'carbs': 98, 'fat': 119, 'saturated fat': 35, 'protein': 153 },
{ 'date': '2014-07-07', 'calories': 2078, 'carbs': 98, 'fat': 119, 'saturated fat': 35, 'protein': 153 }
]
}
Example 1:
mfp.fetchDateRange('username', '2014-09-15', '2014-09-18', 'all', function(data){
console.log(data);
});
Example 2:
mfp.fetchDateRange('username', '2014-09-15', '2014-09-18', ['calories', 'protein', 'carbs', 'fat'], function(data){
console.log(data);
});
Asynchronously checks the privacy status of a user's food diary.
String
Function
status
, which will be a String
with the following possible values:
Example:
mfp.diaryStatusCheck('username', function(status) {
console.log(status);
});
Asynchronously checks to see if all the API functions work correctly. They may cease to work because MyFitnessPal can change the way they present data on their site at any time.
Function
errors
, which will be an array
containing the following possible string
s:
Example:
mfp.apiStatusCheck(function(errors) {
if (errors.length !== 0) {
errors.forEach(function(error){
console.log(error);
});
} else {
console.log("There aren't any errors!");
}
});
Feel free to contribute with any of the items in the backlog.
To Contribute via Issue Notice:
To Contribute via Pull Request:
Fork the repo
In lieu of a formal styleguide, take care to maintain the existing coding style.
Add unit tests for any new or changed functionality. Write tests in the appropriate spec file in the test
directory
Submit a pull request to master branch
gulp lint
gulp test
gulp watch
exportCSV
functionFAQs
A third-party API for accessing MyFitnessPal diary data
The npm package mfp receives a total of 4 weekly downloads. As such, mfp popularity was classified as not popular.
We found that mfp demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.