<commit_before>(function(angular, Promise) {

  'use strict';

  angular
    .module('mwl.bluebird', [])
    .constant('Bluebird', Promise.noConflict())
    .config(function($provide, Bluebird) {

      //Make bluebird API compatible with angular's subset of $q
      //Adapted from: https://gist.github.com/petkaantonov/8363789

      Bluebird.defer = function() {
        var b = Bluebird.pending();
        b.resolve = angular.bind(b, b.fulfill);
        b.reject = angular.bind(b, b.reject);
        b.notify = angular.bind(b, b.progress);
        return b;
      };

      Bluebird.reject = Bluebird.rejected;
      Bluebird.when = Bluebird.cast;

      var originalAll = Bluebird.all;
      Bluebird.all = function(promises) {

        if (angular.isObject(promises) && !angular.isArray(promises)) {

          var promiseArray = [], promiseKeysArray = [];
          angular.forEach(promises, function(promise, key) {

            promiseKeysArray.push(key);
            promiseArray.push(promise);

          });

          return originalAll(promiseArray).then(function(results) {

            var objectResult = {};
            angular.forEach(results, function(result, index) {
              objectResult[promiseKeysArray[index]] = result;
            });
            return objectResult;

          });

        } else {
          return originalAll(promises);
        }

      };

      Bluebird.onPossiblyUnhandledRejection(angular.noop);

      $provide.decorator('$q', function() {
        return Bluebird;
      });

    }).run(function($rootScope, Bluebird) {

      Bluebird.setScheduler(function(cb) {
        $rootScope.$evalAsync(cb);
      });

    });

}(angular, Promise));<commit_msg>Use a different alias for the Promise variable which should hopefully fix browserify<commit_after>(function(angular, P) {

  'use strict';

  angular
    .module('mwl.bluebird', [])
    .constant('Bluebird', P.noConflict())
    .config(function($provide, Bluebird) {

      //Make bluebird API compatible with angular's subset of $q
      //Adapted from: https://gist.github.com/petkaantonov/8363789

      Bluebird.defer = function() {
        var b = Bluebird.pending();
        b.resolve = angular.bind(b, b.fulfill);
        b.reject = angular.bind(b, b.reject);
        b.notify = angular.bind(b, b.progress);
        return b;
      };

      Bluebird.reject = Bluebird.rejected;
      Bluebird.when = Bluebird.cast;

      var originalAll = Bluebird.all;
      Bluebird.all = function(promises) {

        if (angular.isObject(promises) && !angular.isArray(promises)) {

          var promiseArray = [], promiseKeysArray = [];
          angular.forEach(promises, function(promise, key) {

            promiseKeysArray.push(key);
            promiseArray.push(promise);

          });

          return originalAll(promiseArray).then(function(results) {

            var objectResult = {};
            angular.forEach(results, function(result, index) {
              objectResult[promiseKeysArray[index]] = result;
            });
            return objectResult;

          });

        } else {
          return originalAll(promises);
        }

      };

      Bluebird.onPossiblyUnhandledRejection(angular.noop);

      $provide.decorator('$q', function() {
        return Bluebird;
      });

    }).run(function($rootScope, Bluebird) {

      Bluebird.setScheduler(function(cb) {
        $rootScope.$evalAsync(cb);
      });

    });

}(angular, P));
{'fraction_non_alphanumeric': 0.1331028522039758, 'fraction_numerical': 0.004033419763756842, 'mean_word_length': 2.2847682119205297, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6866120', 'n_tokens_mistral': 1038, 'n_tokens_neox': 985, 'n_words': 177}