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.
rn-redux-file-logger
Advanced tools
This module helps us log redux actions into a android/ios file system.
This project exports a middleware that creates a csv log file in the android/ios file system. It has the following functionalities:
Gives the developer control over what actions need to be logged inside the csv file.
Can be plugged into any project with minimal setup.
Provides the name of the CSV file back to the project so that the user can use it to either send to the server or email or do anything with it.
Fault tolerant if any of the write calls to the file system fails.
This project has a peer dependency of react-native-fs. This project requires the project that uses it to have this module installed for file manipulation.
This project exports these functions.
setupLoggingMiddleware(actionsToIgnore: string[], fileName: string) //Function to create the logging middleware.
This function as the name suggests creates a loggingMiddleware that can be plugged inside any application. It takes two arguments:
actionsToIgnore: Array of actions that need to be ignored by the middleware.
actionsToSkipPayload: Array of actions whose payload need to be ignored to by the middleware.
fileName: Name of the file where the logs are stored. Give the file with an extension. By default name is logs.csv.
getFileName() //Function to get the file name and file path.
This function helps in getting the file name and the file path.
deleteFile() //Function to delete the logs file.
This function deletes the log file from the file system.
getFileContent(encoding: ('ascii' | 'base64' | 'utf8')) // Function to get the file content.
This function return a promise which has the file content in it. Encoding can be passed as an argument. utf8 by default.
purgeFileContent(noOfDays: number) //Function to purge the file content.
This function will purge the contents of the file based on the noOfDays that are passed. All rows that have a timepstamp less than noOfDays ago will be purged.
If you see any bug or any feature addition, do create something in the issues section of the repository and we can take a look. Star the project if you like it :D
FAQs
This module helps us log redux actions into a android/ios file system.
The npm package rn-redux-file-logger receives a total of 0 weekly downloads. As such, rn-redux-file-logger popularity was classified as not popular.
We found that rn-redux-file-logger demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.