1.0.6 • Published 2 years ago

@pyou/copylog v1.0.6

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

Install

Using npm:

npm install @pyou/copylog

Using yarn:

yarn add @pyou/copylog

Usage

Use the setLog method to store log information:

import { setLog } from "@pyou/copylog";

const add = () => {
    let a = 1, b = 1, c;
    setLog('before add');
    c = a + b;
    setLog('after add');
    return c;
}

When you need to copy the log information, you need to create a div block, and then bind a click event to the div node. The callback logic of the event is to execute the showConfirm method. When you click the div 10 times, it will pop up A confirm box, after clicking confirm, the log information will be written to the pasteboard. At this time, you only need to select the paste function to copy the log information to other places.

import { showConfirm } from "@pyou/copylog";

//react jsx
<div onClick={showConfirm} />
1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago