Skip to content

Commit d14f5fe

Browse files
author
AndreyGeonya
committed
resolve merge conflict
2 parents 2469516 + 76b299d commit d14f5fe

5 files changed

Lines changed: 20 additions & 17 deletions

File tree

‎gulpfile.js‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
var gulp = require('gulp'),
33
shell = require('gulp-shell'),
44
jshint = require('gulp-jshint'),
5-
jasmine = require('gulp-jasmine');
5+
jasmine = require('gulp-jasmine'),
6+
stylish = require('jshint-stylish');
67

78
gulp.task('jsdoc', shell.task([
89
'./node_modules/.bin/jsdoc -c ./doc-config.json',
@@ -11,12 +12,13 @@ gulp.task('jsdoc', shell.task([
1112
gulp.task('lint', function () {
1213
return gulp.src(['./src/**/*.js'], ['./test/**/*.js'])
1314
.pipe(jshint())
14-
.pipe(jshint.reporter('default'));
15+
.pipe(jshint.reporter(stylish))
16+
.pipe(jshint.reporter('fail'));
1517
});
1618

1719
gulp.task('test', function () {
1820
return gulp.src('test/**/*.spec.js')
1921
.pipe(jasmine());
2022
});
2123

22-
gulp.task('build', ['lint', 'test']);
24+
gulp.task('build', ['lint', 'test']);

‎package.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"gulp-jasmine": "^1.0.1",
1212
"gulp-jshint": "^1.9.0",
1313
"gulp-shell": "^0.2.11",
14-
"jsdoc": "3.3.0-alpha13"
14+
"jsdoc": "3.3.0-alpha13",
15+
"jshint-stylish": "^1.0.0"
1516
},
1617
"scripts": {
1718
"test": "echo \"Error: no test specified\" && exit 1"

‎src/compression/runlength/runlength.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* Run-length encoding.
3-
* The idea of this algorithm is to remove the usless zeros and
3+
* The idea of this algorithm is to remove the usless zeros and
44
* give us representation of string in binary which in which the
55
* zeros will be stripped and replaced with their count.
66
*/

‎src/data-structures/binary-search-tree.js‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
* @param {Node} right Right sibling.
3737
* @param {Node} parent Parent of the node.
3838
*/
39-
exports.Node = function(value, left, right, parent) {
39+
exports.Node = function (value, left, right, parent) {
4040
/**
4141
* @member {Number|String}
4242
*/
@@ -52,7 +52,7 @@
5252
* @public
5353
* @constructor
5454
*/
55-
exports.BinaryTree = function() {
55+
exports.BinaryTree = function () {
5656
this._root = null;
5757
};
5858

@@ -90,8 +90,8 @@
9090
*
9191
* @private
9292
* @param {Node} current Node from which to start the traversal.
93-
* @param {Function} callback Callback which will be called
94-
* for each traversed node.
93+
* @param {Function} callback Callback which
94+
* will be called for each traversed node.
9595
*/
9696
exports.BinaryTree.prototype._inorder = function (current, callback) {
9797
if (!current) {
@@ -121,8 +121,8 @@
121121
*
122122
* @private
123123
* @param {Node} current Node from which to start the traversal.
124-
* @param {Function} callback Callback which will be called
125-
* for each traversed node.
124+
* @param {Function} callback Callback which will
125+
* be called for each traversed node
126126
*/
127127
exports.BinaryTree.prototype._postorder = function (current, callback) {
128128
if (!current) {
@@ -167,7 +167,7 @@
167167

168168
/**
169169
* Pre-order preorder traversal of the whole tree.
170-
*
170+
*
171171
* @public
172172
* @param {Function} callback Callback which will
173173
* be called for each traversed node.
@@ -222,7 +222,7 @@
222222
* @param {Node} newChild Child replacement.
223223
*/
224224
exports.BinaryTree.prototype._replaceChild =
225-
function (parent, oldChild, newChild) {
225+
function (parent, oldChild, newChild) {
226226
if (!parent) {
227227
this._root = newChild;
228228
this._root._parent = null;

‎src/data-structures/heap.js‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
/**
22
* A binary heap is a complete binary tree which
33
* satisfies the heap ordering property.
4-
*
4+
*
55
* @example
66
* var Heap = require('path-to-algorithms/src/data-structures/heap').Heap;
7-
*
7+
*
88
* var heap = new Heap(function(a, b) {
99
* return a.birthyear - b.birthyear;
1010
* });
11-
*
11+
*
1212
* heap.add({
1313
* name: 'John',
1414
* birthyear: 1981
@@ -49,7 +49,7 @@
4949
* @constructor
5050
* @param {Function} cmp Function used for comparition between the elements.
5151
*/
52-
exports.Heap = function(cmp) {
52+
exports.Heap = function (cmp) {
5353
this._heap = [];
5454
if (typeof cmp === 'function') {
5555
this._cmp = cmp;

0 commit comments

Comments
 (0)