# ct-wp-js-log

> A simple way of doing logging on the JavaScript side in WordPress.

Latest version **1.0.4** (published 2017-10-26) · ISC license · 0 weekly downloads

## Install

```sh
npm install ct-wp-js-log
pnpm add ct-wp-js-log
yarn add ct-wp-js-log
bun add ct-wp-js-log
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2017-10-26 |
| First published | 2016-08-19 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | andreiglingeanu |

## Links

- npm: https://www.npmjs.com/package/ct-wp-js-log
- Repository: https://github.com/Creative-Themes/wp-js-log
- Homepage: https://github.com/Creative-Themes/wp-js-log#readme
- Issues: https://github.com/Creative-Themes/wp-js-log/issues
- npm.io page: https://npm.io/package/ct-wp-js-log

## Recent versions

- 1.0.4 (latest) — 2017-10-26
- 1.0.3 — 2016-08-19
- 1.0.2 — 2016-08-19
- 1.0.1 — 2016-08-19
- 1.0.0 — 2016-08-19

## README

## Synopsis

A simple way of doing logging on the JavaScript side in WordPress.

## Code Example

```javascript
log = require('ct-wp-js-log');
log('simple log');
log.log('another one');
log.error('error log');
```

## Motivation

We wanted a _very_ simple way of doing logs, while checking for the `WP_DEBUG`
global variable. And we got this as a result.

## Installation

Don't forget to localize your server side `WP_DEBUG` constant.
```php
if (defined('WP_DEBUG')) {
	wp_localize_script(
		'your-handle',
		'WP_DEBUG',
		array('debug' => true)
	);
}
```

## License

MIT

![](https://avatars0.githubusercontent.com/u/20202907?v=3&s=200)

---
_Source: https://npm.io/package/ct-wp-js-log · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
