1.1.1 • Published 7 months ago
@alvarosabu/core-pkg-test v1.1.1
Core Library
A TypeScript library featuring a functional singleton pattern with configuration options.
Installation
pnpm add @alvarosabu/core-pkg-testUsage
import { coreLibrary } from '@alvarosabu/core-pkg-test';
// Create the library instance with options
const lib = coreLibrary({
debug: true,
onInit: async () => {
console.log('Custom initialization logic');
}
});
// Initialize the library
await lib.initialize();
// Check if initialized
console.log(lib.isInitialized()); // true
// Get current options
console.log(lib.getOptions()); // { debug: true, onInit: [Function: onInit] }Development
# Install dependencies
pnpm install
# Build the library
pnpm build
# Run in development mode with watch
pnpm dev
# Run linting
pnpm lint
# Format code
pnpm format
# Type checking
pnpm typecheckLicense
ISC