Socket
Socket
Sign inDemoInstall

pug-error

Package Overview
Dependencies
0
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.0 to 1.3.0

6

index.js

@@ -28,8 +28,8 @@ 'use strict';

}).join('\n');
fullMessage = (filename || 'Jade') + ':' + location + '\n' + context + '\n\n' + message;
fullMessage = (filename || 'Pug') + ':' + location + '\n' + context + '\n\n' + message;
} else {
fullMessage = (filename || 'Jade') + ':' + location + '\n\n' + message;
fullMessage = (filename || 'Pug') + ':' + location + '\n\n' + message;
}
var err = new Error(fullMessage);
err.code = 'JADE:' + code;
err.code = 'PUG:' + code;
err.msg = message;

@@ -36,0 +36,0 @@ err.line = line;

{
"name": "pug-error",
"version": "0.0.0",
"description": "Standard error objects for jade",
"version": "1.3.0",
"description": "Standard error objects for pug",
"keywords": [
"jade",
"pug"

@@ -22,6 +21,6 @@ ],

"type": "git",
"url": "https://github.com/jadejs/jade-error.git"
"url": "https://github.com/pugjs/pug-error.git"
},
"author": "Forbes Lindesay",
"license": "MIT"
}
}

@@ -1,12 +0,12 @@

# jade-error
# pug-error
Standard error objects for jade. This module is intended for use by the lexer, parser, loader, linker, code-generator and any plugins.
Standard error objects for pug. This module is intended for use by the lexer, parser, loader, linker, code-generator and any plugins.
[![Build Status](https://img.shields.io/travis/jadejs/jade-error/master.svg)](https://travis-ci.org/jadejs/jade-error)
[![Dependency Status](https://img.shields.io/gemnasium/jadejs/jade-error.svg)](https://gemnasium.com/jadejs/jade-error)
[![NPM version](https://img.shields.io/npm/v/jade-error.svg)](https://www.npmjs.org/package/jade-error)
[![Build Status](https://img.shields.io/travis/pugjs/pug-error/master.svg)](https://travis-ci.org/pugjs/pug-error)
[![Dependency Status](https://img.shields.io/gemnasium/pugjs/pug-error.svg)](https://gemnasium.com/pugjs/pug-error)
[![NPM version](https://img.shields.io/npm/v/pug-error.svg)](https://www.npmjs.org/package/pug-error)
## Installation
npm install jade-error
npm install pug-error

@@ -16,3 +16,3 @@ ## Usage

```js
var error = require('jade-error');
var error = require('pug-error');
```

@@ -22,3 +22,3 @@

Create a Jade error object.
Create a Pug error object.

@@ -34,3 +34,3 @@ `code` is a required unique code for the error type that can be used to pinpoint a certain error.

- `column`: the offending column
- `src`: the Jade source, if available, for pretty-printing the error context
- `src`: the Pug source, if available, for pretty-printing the error context

@@ -42,6 +42,6 @@ The resulting error object is a simple Error object with additional properties given in the arguments.

```js
var error = require('jade-error');
var error = require('pug-error');
var err = error('MY_CODE', 'My message', {line: 3, filename: 'myfile', src: 'foo\nbar\nbaz\nbash\nbing'});
// { code: 'JADE:MY_CODE',
// { code: 'PUG:MY_CODE',
// msg: 'My message',

@@ -48,0 +48,0 @@ // line: 3,

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc