UNPKG

568 BJavaScriptView Raw
1/**
2 * Copyright (c) Facebook, Inc. and its affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 *
7 * @format
8 * @flow
9 */
10
11'use strict';
12
13const EventEmitter = require('EventEmitter');
14const RCTDeviceEventEmitter = require('RCTDeviceEventEmitter');
15
16/**
17 * Mock the NativeEventEmitter as a normal JS EventEmitter.
18 */
19class NativeEventEmitter extends EventEmitter {
20 constructor() {
21 super(RCTDeviceEventEmitter.sharedSubscriber);
22 }
23}
24
25module.exports = NativeEventEmitter;