more
This commit is contained in:
dopeuni444
2025-07-31 12:23:33 +04:00
parent 20b46678b7
commit b5a22951ae
3401 changed files with 331100 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
Copyright (c) 2019-2020, Sideway. Inc, and project contributors
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* The names of any contributors may not be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS OFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@@ -0,0 +1,14 @@
# @sideway/pinpoint
#### Return the filename and line number of the calling function.
**pinpoint** is part of the **joi** ecosystem.
### Visit the [joi.dev](https://joi.dev) Developer Portal for tutorials, documentation, and support
## Useful resources
- [Documentation and API](https://joi.dev/module/pinpoint/)
- [Version status](https://joi.dev/resources/status/#pinpoint) (builds, dependencies, node versions, licenses, eol)
- [Changelog](https://joi.dev/module/pinpoint/changelog/)
- [Project policies](https://joi.dev/policies/)

View File

@@ -0,0 +1,21 @@
'use strict';
const internals = {};
exports.location = function (depth = 0) {
const orig = Error.prepareStackTrace;
Error.prepareStackTrace = (ignore, stack) => stack;
const capture = {};
Error.captureStackTrace(capture, this);
const line = capture.stack[depth + 1];
Error.prepareStackTrace = orig;
return {
filename: line.getFileName(),
line: line.getLineNumber()
};
};

View File

@@ -0,0 +1,25 @@
{
"name": "@sideway/pinpoint",
"description": "Return the filename and line number of the calling function",
"version": "2.0.0",
"repository": "git://github.com/sideway/pinpoint",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"files": [
"lib"
],
"keywords": [
"utilities"
],
"dependencies": {},
"devDependencies": {
"typescript": "4.0.x",
"@hapi/code": "8.x.x",
"@hapi/lab": "24.x.x"
},
"scripts": {
"test": "lab -a @hapi/code -t 100 -L -Y",
"test-cov-html": "lab -a @hapi/code -t 100 -L -r html -o coverage.html"
},
"license": "BSD-3-Clause"
}