ims-analytics
v1.0.9
Published
This package provides analytics functionality.
Readme
@ims-learning-engineering/pkg.analytics
This package provides analytics functionality.
Installation
To install the package, run:
npm install @ims-learning-engineering/pkg.analyticsUsage
import AnalyticsService from '@ims-learning-engineering/pkg.analytics';
const analytics = new AnalyticsService();
const data = '<html>...</html>';
// The ID must be between 5 and 20 characters
const id = 'user12345';
const processedData = analytics.process(id, data);
const retrievedId = analytics.retrieve(processedData);
const count = analytics.count(processedData);
console.log('Processed Data:', processedData);
console.log('Retrieved ID:', retrievedId);
console.log('Count:', count);Scripts
npm run clean: Removes thedistdirectory.npm run build: Builds the project for Node.js.npm run dev: Watches for changes and builds the project.npm run test: Runs the tests.npm run lint: Lints the source code.npm run format: Formats the source code.
License
This project is licensed under the ISC License.
