# lazy-log

> A fun way to log stuff

Latest version **0.0.5** (published 2013-12-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install lazy-log
pnpm add lazy-log
yarn add lazy-log
bun add lazy-log
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.5 |
| Published | 2013-12-08 |
| First published | 2013-12-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Shad Beard |
| Maintainers | dahs81 |
| Keywords | lazyLog, log, fun, chainable |

## Links

- npm: https://www.npmjs.com/package/lazy-log
- Repository: https://github.com/Dahs81/lazyLog
- Issues: https://github.com/Dahs81/lazyLog/issues
- npm.io page: https://npm.io/package/lazy-log

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads
- [child-process-debug](https://npm.io/package/child-process-debug.md) — 695 weekly downloads

## Recent versions

- 0.0.5 (latest) — 2013-12-08
- 0.0.4 — 2013-12-07
- 0.0.1 — 2013-12-07

## README

# Lazy Log

A simple wrapper for console.log that does some fun stuff.

## A fun logger

+ This module is a wrapper around console.log.
+ The available functions all use a **chainable** syntax.
+ If a string is passed to one of the functions, it will log out the transformed string.
+ If an object is passed to one of the functions, it will log out all of the values and transform each one.  The key is not currently logged.
if an array is passed to one of the functions, it will loop over the array and either log the string or act on it in the manner mentioned above if it is an object.

### Installation and Setup

```javascript
npm install lazy-log
```

```javascript
var ll = require('lazy-log');
```

### Examples

```javascript
ll.log('This is a simple log');
ll.log({foo: 'bar'});
ll.log(['Test', 'baz', {foo: 'bar'}]);
```

#### Results
+ This is a simple log

```javascript
// Simple examples of other log functions
ll.toLower('TEST');
ll.toLower({name: 'JOHN DOE'});
ll.toLower(['ONE', 'TWO', 'THREE']);
```

#### Results
+ test
+ john doe
+ one
+ two
+ three
```

```javascript
ll.toUpper('test');
ll.toUpper({name: 'john doe'});
ll.toUpper(['one', 'two', 'three']);
```

#### Results
+ TEST
+ JOHN DOE
+ ONE
+ TWO
+ THREE

```javascript
ll.log('test simple').toLower('TEST').toUpper('test');
```

#### Results
+ test simple
+ test
+ TEST

```javascript
ll.toLower(['TEST', {a: 'MAKE LOWER'}, [{a:'AAA', b: ['BBB', {c: 'CCC'}]}]]);

#### Results
+ test
+ make lower
+ aaa
+ bbb
+ ccc
```

```javascript
ll.toLower(['TEST', {a: 'MAKE LOWER'}]).toUpper('test').toUpper([{a: 'aaa'}]);
```

#### Results
+ test
+ make lower
+ TEST
+ AAA

```javascript
ll.toArr(['Test', {a: 'b', foo: 'bar'}, {c: ['NEWS', {test: 'apple'}]}]);
```

#### Results
+ [ 'Test', 'b', 'bar', 'NEWS', 'apple' ]

```javascript
ll.reg('This is my message that I am looking for the word "message"', /message/i);
ll.reg('This is my message that I am looking for the word "message"', /message/g);
ll.reg({test: 'message', b: 'this is a message - message'}, /message/g);
```

#### Results
+ [ 'message',
  index: 11,
  input: 'This is my message that I am looking for the word "message"' ]
+ [ 'message', 'message' ]
+ [ 'message' ]
+ [ 'message', 'message' ]


### To the Community
I will probably be adding some more functions some, but adding new functionality is super easy.  Check out the code, do pull requests, and let me know if you have any questions.

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