Files
react-native/packager/react-packager/src/node-haste/Polyfill.js
T
David AurelioandFacebook Github Bot 7 667aaa4621 Bring back node-haste to fbsource
Summary:
Since jest stopped using node-haste a while ago, we are the only client left.
This brings back node-haste back to fbsource to allow us to iterate faster.

Reviewed By: bestander

Differential Revision: D3641341

fbshipit-source-id: a859f8834765723a3515e2cf265581b9dd83997c
2016-07-29 11:15:02 -07:00

38 lines
537 B
JavaScript

'use strict';
const Module = require('./Module');
class Polyfill extends Module {
constructor(options) {
super(options);
this._id = options.id;
this._dependencies = options.dependencies;
}
isHaste() {
return Promise.resolve(false);
}
getName() {
return Promise.resolve(this._id);
}
getPackage() {
return null;
}
getDependencies() {
return Promise.resolve(this._dependencies);
}
isJSON() {
return false;
}
isPolyfill() {
return true;
}
}
module.exports = Polyfill;