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.
uttori-analytics-provider-json-file
Advanced tools
Analytics provider for Uttori that uses JSON files.
Uttori analytics provider using JSON files on disk.
npm install --save uttori-analytics-provider-json-file
{
directory: '',
name: 'visits',
extension: 'json',
}
Page view analytics for Uttori documents using JSON files stored on the local file system.
Kind: global class
Properties
Name | Type | Description |
---|---|---|
config | Object | The configuration object. |
Creates an instance of AnalyticsProvider.
Param | Type | Description |
---|---|---|
config | Object | A configuration object. |
config.directory | string | The directory to store the JSON file containing the page view analytics. |
[config.name] | string | The file name of the file containing the page view analytics. |
[config.param] | string | The file extension of the file containing the page view analytics. |
Example (Init AnalyticsProvider)
const analyticsProvider = new AnalyticsProvider({ directory: 'data' });
Updates the view count for a given document slug.
Kind: instance method of AnalyticsProvider
Param | Type | Description |
---|---|---|
slug | string | The slug ofthe document to be updated. |
Example
analyticsProvider.update('faq');
Number
Returns the view count for a given document slug.
Kind: instance method of AnalyticsProvider
Returns: Number
- View count for the given slug.
Param | Type | Description |
---|---|---|
slug | string | The slug of the document to be looked up. |
Example
analyticsProvider.get('faq');
➜ 10
Array
Returns the most popular documents.
Kind: instance method of AnalyticsProvider
Returns: Array
- View count for the given slug.
Param | Type | Description |
---|---|---|
limit | limit | The number of documents to return. |
Example
analyticsProvider.getPopularDocuments(10);
➜ [ { 'faq': 10 } ]
To run the test suite, first install the dependencies, then run npm test
:
npm install
npm test
DEBUG=Uttori* npm test
FAQs
Analytics provider for Uttori that uses JSON files.
The npm package uttori-analytics-provider-json-file receives a total of 0 weekly downloads. As such, uttori-analytics-provider-json-file popularity was classified as not popular.
We found that uttori-analytics-provider-json-file 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.