Skip to content

Commit

Permalink
Drop co.wrap and use async/await (#183)
Browse files Browse the repository at this point in the history
  • Loading branch information
SparshithNRai authored and stefanpenner committed Dec 5, 2019
1 parent 24b6b8f commit 918bb54
Show file tree
Hide file tree
Showing 6 changed files with 215 additions and 230 deletions.
2 changes: 1 addition & 1 deletion test/.jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@
"trailing": true,
"white": false,
"eqnull": true,
"esnext": true
"esversion": 8
}
3 changes: 0 additions & 3 deletions test/helpers/incomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
var Filter = require('../../');

class IncompleteFilter extends Filter {
constructor(inputTree, options) {
super(inputTree, options);
}
}

module.exports = IncompleteFilter;
4 changes: 0 additions & 4 deletions test/helpers/rot13-async.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ const Filter = require('../../');


module.exports = class Rot13Async extends Filter {
constructor(inputTree, options) {
super(inputTree, options);
}

processString(content) {
return new Promise((resolve) => {
const result = content.replace(/[a-zA-Z]/g, (c) => {
Expand Down
5 changes: 1 addition & 4 deletions test/helpers/rot13.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,10 @@ var Filter = require('../../');


class Rot13 extends Filter {
constructor(inputTree, options) {
super(inputTree, options);
}
processString (content) {
return content.replace(/[a-zA-Z]/g, function(c){
return String.fromCharCode((c <= 'Z' ? 90 : 122) >= (c = c.charCodeAt(0) + 13) ? c : c - 26);
});
}
}
module.exports = Rot13;
module.exports = Rot13;
4 changes: 0 additions & 4 deletions test/helpers/simple.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
'use strict';

var inherits = require('util').inherits;
var Filter = require('../../');

class MyFilter extends Filter {
constructor(inputTree, options) {
super(inputTree, options);
}
}

module.exports = MyFilter;
Loading

0 comments on commit 918bb54

Please sign in to comment.