(require("pete/lib/createId"))(callee) → {string}
- Description:
Create unique function-call identifier based on its location.
It is created from filepath, line number and column number marking the point from which
calleewas called.WARNING:
Bun 1.2.x does not include column number when it is 0.
So when running tests with Bun, ID of test called from the beginnning of a line will be just${file path}:${line number}.Example results:
- "/app/examples/example1.js:7:1", when running with Node.js,
- "/app/examples/example1.js:7", when running with Bun.
- Source:
- See:
Parameters:
| Name | Type | Description |
|---|---|---|
callee |
function | just like with |
Returns:
- Type
- string