JSPM

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

X Marks The Spot: A simple console.log() [debugging] wrapper that allows functions to be passed in.

Package Exports

  • xmark

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 (xmark) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

xmark

X Marks The Spot: A simple console.log() [debugging] wrapper that allows functions to be passed in.

Build Status

Why?

  1. Save yourself time by writing x() instead of console.log()
  2. x() will also accept a function as a parameter, useful for debugging
  3. In a future release, x() can be conditionally silenced to only work in development mode, leaving your console.log() statements alone.

Install

$ npm install --save xmark

Usage

const x = require('xmark');

x(1);
//=> 1

x('2');
//=> '2'

x({3: 3});
//=> {3: 3}

x(function () {
    console.log('4');
});
//=> 4

x(5,6);
//=> 5
//=> 6

API

xmark(input)

input

Type: string|number|object|function

The object(s) you want to print, or the function(s) you want to run.

License

MIT © Michael Wuergler