first_long.js 985 B

1234567891011121314151617181920212223242526272829303132333435
  1. export default function theFunction(action$, store) {
  2. return action$.ofType(THE_ACTION).switchMap(action => Observable
  3. .webSocket({
  4. url: THE_URL,
  5. more: stuff(),
  6. evenMore: stuff({
  7. value1: true,
  8. value2: false,
  9. value3: false
  10. })
  11. })
  12. .filter(data => theFilter(data))
  13. .map(({ theType, ...data }) => theMap(theType, data))
  14. .retryWhen(errors => errors));
  15. }
  16. function f() {
  17. return this._getWorker(workerOptions)({
  18. filePath,
  19. hasteImplModulePath: this._options.hasteImplModulePath,
  20. }).then(
  21. metadata => {
  22. // `1` for truthy values instead of `true` to save cache space.
  23. fileMetadata[H.VISITED] = 1;
  24. const metadataId = metadata.id;
  25. const metadataModule = metadata.module;
  26. if (metadataId && metadataModule) {
  27. fileMetadata[H.ID] = metadataId;
  28. setModule(metadataId, metadataModule);
  29. }
  30. fileMetadata[H.DEPENDENCIES] = metadata.dependencies || [];
  31. }
  32. );
  33. }