Refactor(ES6): Null Factory

This commit is contained in:
SendilKumar N 2017-02-22 16:01:17 +08:00
parent 0cb0bad1d9
commit 2a76e5ae6b
1 changed files with 7 additions and 5 deletions

View File

@ -2,9 +2,11 @@
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
function NullFactory() {}
module.exports = NullFactory;
"use strict";
NullFactory.prototype.create = function(data, callback) {
return callback();
};
class NullFactory {
create(data, callback) {
return callback();
}
}
module.exports = NullFactory;