Skip to content

Commit

Permalink
Merge pull request #240 from gyandeeps/master
Browse files Browse the repository at this point in the history
Fix: Remove `inherit` and use Object.create for inheritance (fixes #239)
  • Loading branch information
Vitaly Puzrin committed Jan 11, 2016
2 parents df57eb5 + 6bf7c65 commit 05799a3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ node_modules
doc
benchmark/implementations/*
!/benchmark/implementations/current/
.idea
7 changes: 2 additions & 5 deletions lib/js-yaml/exception.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
//
'use strict';


var inherits = require('inherit');


function YAMLException(reason, mark) {
// Super constructor
Error.call(this);
Expand All @@ -27,7 +23,8 @@ function YAMLException(reason, mark) {


// Inherit from Error
inherits(YAMLException, Error);
YAMLException.prototype = Object.create(Error.prototype);
YAMLException.prototype.constructor = YAMLException;


YAMLException.prototype.toString = function toString(compact) {
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@
},
"dependencies": {
"argparse": "^1.0.2",
"esprima": "^2.6.0",
"inherit": "^2.2.2"
"esprima": "^2.6.0"
},
"devDependencies": {
"ansi": "*",
Expand Down

0 comments on commit 05799a3

Please sign in to comment.