<commit_before>/**
 * Function polyfill / shims
 *
 * (c) copyright 2011-2012 <NAME> and <NAME>
 *
 * This module is part of the cujo.js family of libraries (http://cujojs.com/).
 *
 * Licensed under the MIT License at:
 * 		http://www.opensource.org/licenses/mit-license.php
 */
/**
 * 	TODO: push?
 *
 */
define (['./_base', 'exports'], function (base, exports) {
	"use strict";

	var alreadyShimmed = false,
		slice = [].slice,
		missing = {},
		proto = Function.prototype,
		featureMap;

	featureMap = {
		'bind': 'bind'
	};

	function has (feature) {
		var prop = featureMap[feature];
		return base.isFunction(proto[prop]);
	}

	// adapted from Mozilla Developer Network example at
	// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/bind
	function bind (obj) {
		var args = slice.call(arguments, 1),
			self = this,
			nop = function () {},
			bound = function () {
			  return self.apply(this instanceof nop ? this : (obj || {}), args.concat(slice.call(arguments)));
			};
		nop.prototype = this.prototype;
		bound.prototype = new nop();
		return bound;
	}

	// check for missing features
	if (!has('function-bind')) {
		missing.bind = bind;<commit_msg>no longer augments prototype in engines that don't need it<commit_after>/**
 * Function polyfill / shims
 *
 * (c) copyright 2011-2012 <NAME> and <NAME>
 *
 * This module is part of the cujo.js family of libraries (http://cujojs.com/).
 *
 * Licensed under the MIT License at:
 * 		http://www.opensource.org/licenses/mit-license.php
 */
/**
 * 	TODO: push?
 *
 */
define (['./_base', 'exports'], function (base, exports) {
	"use strict";

	var alreadyShimmed = false,
		slice = [].slice,
		missing = {},
		proto = Function.prototype,
		featureMap;

	featureMap = {
		'function-bind': 'bind'
	};

	function has (feature) {
		var prop = featureMap[feature];
		return base.isFunction(proto[prop]);
	}

	// adapted from Mozilla Developer Network example at
	// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/bind
	function bind (obj) {
		var args = slice.call(arguments, 1),
			self = this,
			nop = function () {},
			bound = function () {
			  return self.apply(this instanceof nop ? this : (obj || {}), args.concat(slice.call(arguments)));
			};
		nop.prototype = this.prototype;
		bound.prototype = new nop();
		return bound;
	}

	// check for missing features
	if (!has('function-bind')) {
		missing.bind = bind;
{'fraction_non_alphanumeric': 0.15694330320460148, 'fraction_numerical': 0.007395234182415777, 'mean_word_length': 3.403254972875226, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6131363', 'n_tokens_mistral': 865, 'n_tokens_neox': 772, 'n_words': 210}