JSPM

@upendra.manike/dev-utils

1.0.2
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 11
    • Score
      100M100P100Q52226F
    • License MIT

    Developer utilities for JavaScript/TypeScript - logging with timestamps, execution time measurement, query string parser, and pub-sub event emitter. Essential tools for development and debugging.

    Package Exports

    • @upendra.manike/dev-utils
    • @upendra.manike/dev-utils/dist/index.js
    • @upendra.manike/dev-utils/dist/index.mjs

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@upendra.manike/dev-utils) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    dev-utils

    Developer utilities - logging, timing, query string parser, pub-sub event emitter.

    Installation

    npm install @upendra.manike/dev-utils

    Usage

    import { logger, measureTime, parseQueryString, EventEmitter } from '@upendra.manike/dev-utils';
    
    // Logging
    const log = logger('MyApp');
    log.log('Hello');
    
    // Timing
    const { result, time } = await measureTime(async () => {
      return await fetchData();
    });
    
    // Query string
    const params = parseQueryString('?name=John&age=30');
    
    // Events
    const emitter = new EventEmitter();
    emitter.on('event', (data) => console.log(data));
    emitter.emit('event', 'Hello');

    License

    MIT