This commit is contained in:
chrosey
2017-09-13 07:52:34 +02:00
parent a1f16c37f4
commit 2340b0226b
24621 changed files with 2912161 additions and 149 deletions
+18
View File
@@ -0,0 +1,18 @@
'use strict';
module.exports = Error.captureStackTrace || function (error) {
var container = new Error();
Object.defineProperty(error, 'stack', {
configurable: true,
get: function getStack() {
var stack = container.stack;
Object.defineProperty(this, 'stack', {
value: stack
});
return stack;
}
});
};
+91
View File
@@ -0,0 +1,91 @@
{
"_args": [
[
{
"raw": "capture-stack-trace@^1.0.0",
"scope": null,
"escapedName": "capture-stack-trace",
"name": "capture-stack-trace",
"rawSpec": "^1.0.0",
"spec": ">=1.0.0 <2.0.0",
"type": "range"
},
"c:\\xampp\\htdocs\\laravel\\node_modules\\create-error-class"
]
],
"_from": "capture-stack-trace@>=1.0.0 <2.0.0",
"_id": "capture-stack-trace@1.0.0",
"_inCache": true,
"_location": "/capture-stack-trace",
"_npmUser": {
"name": "floatdrop",
"email": "floatdrop@gmail.com"
},
"_npmVersion": "1.4.28",
"_phantomChildren": {},
"_requested": {
"raw": "capture-stack-trace@^1.0.0",
"scope": null,
"escapedName": "capture-stack-trace",
"name": "capture-stack-trace",
"rawSpec": "^1.0.0",
"spec": ">=1.0.0 <2.0.0",
"type": "range"
},
"_requiredBy": [
"/create-error-class"
],
"_resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz",
"_shasum": "4a6fa07399c26bba47f0b2496b4d0fb408c5550d",
"_shrinkwrap": null,
"_spec": "capture-stack-trace@^1.0.0",
"_where": "c:\\xampp\\htdocs\\laravel\\node_modules\\create-error-class",
"author": {
"name": "Vsevolod Strukchinsky",
"email": "floatdrop@gmail.com",
"url": "github.com/floatdrop"
},
"bugs": {
"url": "https://github.com/floatdrop/capture-stack-trace/issues"
},
"dependencies": {},
"description": "Error.captureStackTrace ponyfill",
"devDependencies": {
"mocha": "*"
},
"directories": {},
"dist": {
"shasum": "4a6fa07399c26bba47f0b2496b4d0fb408c5550d",
"tarball": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.js"
],
"gitHead": "eb46ce326fa9074b6ce17a94d4b76500321a331f",
"homepage": "https://github.com/floatdrop/capture-stack-trace",
"keywords": [
"Error",
"captureStackTrace"
],
"license": "MIT",
"maintainers": [
{
"name": "floatdrop",
"email": "floatdrop@gmail.com"
}
],
"name": "capture-stack-trace",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+https://github.com/floatdrop/capture-stack-trace.git"
},
"scripts": {
"test": "mocha"
},
"version": "1.0.0"
}
+36
View File
@@ -0,0 +1,36 @@
# capture-stack-trace [![Build Status](https://travis-ci.org/floatdrop/capture-stack-trace.svg?branch=master)](https://travis-ci.org/floatdrop/capture-stack-trace)
> Ponyfill for Error.captureStackTrace
## Install
```
$ npm install --save capture-stack-trace
```
## Usage
```js
var captureStackTrace = require('capture-stack-trace');
captureStackTrace({});
// => {stack: ...}
```
## API
### captureStackTrace(error)
#### error
*Required*
Type: `Object`
Target Object, that will recieve stack property.
## License
MIT © [Vsevolod Strukchinsky](http://github.com/floatdrop)