npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

mcover

v0.0.2

Published

A cross platform code coverage framework for Haxe with testing and profiling applications. Supports AVM1, AVM2, JavaScript, C++, PHP and Neko.

Downloads

1

Readme

MCover is a collection of macro based cross-platform code coverage and quality tools. MCover runs on all main Haxe targets including js, flash, neko, cpp and php.

To install mcover:

haxelib install mcover

MCover supports Haxe 2.10 and Haxe 3

Features

Code Coverage

MCover can provide detailed coverage of executed code, including:

  • code blocks (statements)
  • code branches

Example macro usage:

--macro mcover.MCover.coverage([''], ['src'])

Function logging

MCover can generate timing metrics around function entry/exit times, including:

  • function start/exit time
  • function duration (both inclusive and exclusive of nested methods)
  • call stack depths

Example macro usage:

--macro mcover.MCover.logger([''], ['src'])

Cross Platform

MCover has been designed to work with any Haxe target. Officially we support the following:

  • ActionScript
  • JavaScript
  • Neko
  • CPP
  • PHP

Code Coverage

For detailed information see src/m/cover/coverage/README.md

Compiler args

Add the following to your hxml file:

-lib mcover
--macro mcover.MCover.coverage(['{package}'], {classPaths}, {ignoredClasses})

Where:

  • package is an array of packages to filter on (e.g. 'com.example'). Default is all packages - e.g. ['']
  • classPaths is an array of classpaths to include (e.g. ['src']). Default is local path - e.g ['']
  • ignoredClasses is an array of specific classes to ignore (e,g, ['com.example.IgnoredClass']). Default is null.

Example:

--macro mcover.MCover.coverage(['com.example'], ['src'], null)

Note: Only use single quotation marks (' ') to avoid compiler issues on windows platforms

Runtime report

Add the followng code to your application after code has executed:

var logger = mcover.coverage.MCoverage.getLogger();
logger.report();

Function Logging

For detailed information see src/m/cover/logger/README.md

Compiler args

Add the following to your hxml file:

-lib mcover
--macro mcover.MCover.logger(['{package}'], {classPaths}, {ignoredClasses})

Where:

  • package is an array of packages to filter on (e.g. 'com.example'). Default is all packages - e.g. ['']
  • classPaths is an array of classpaths to include (e.g. ['src']). Default is local path - e.g ['']
  • ignoredClasses is an array of specific classes to ignore (e,g, ['com.example.IgnoredClass']). Default is null.

Example:

--macro mcover.MCover.logger(['com.example'], ['src'], null)

Note: Only use single quotation marks (' ') to avoid compiler issues on windows platforms

Runtime Usage

Add the followng code to your application to start recording

var logger = mcover.coverage.MCoverLogger.getLogger();
logger.startRecording();

Add the followng code to your application to stop recording and print report

var logger = mcover.coverage.MCoverLogger.getLogger();
logger.stopRecording();
logger.report();

Changes

See CHANGES for full changes

New since 2.0.0

  • Haxe 3 support, includes some breaking changes to APIs to better align with Haxe 3
  • Updated for Munit 2.0
  • Removed support for Haxe 2.08 and 2.09

New since 1.5.x

  • Improved handling of macro generated code blocks

New since 1.4.x

  • Changed top level package from m.cover to mcover

New since 1.3.x

  • Added cpp target support
  • Added php target support
  • Updated for Haxe 2.10

New since 1.2.x

  • Added function logging macro

Building from source

OSX: Use the build.sh bash script (osx only) Windows: Manually run steps within build.sh

Note: Make sure to set the dev path of mcover to /src before running tests (it's a bit tricky running code coverage on itself!)