<commit_before>'use strict';

var d          = require('es5-ext/lib/Object/descriptor')
  , extend     = require('es5-ext/lib/Object/extend-properties')
  , Base       = require('./base')

  , defineProperties = Object.defineProperties

  , BooleanType, proto, StringType, rel;

// Setup
module.exports = BooleanType = extend(Base.$$create('Boolean'), Boolean);
defineProperties(BooleanType, {
	_serialize_: d('c', function (value) { return '1' + Number(value); })
});
BooleanType._is.$$setValue(function (value) {
	return (typeof value === 'boolean');
});
BooleanType._normalize.$$setValue(Boolean);

proto = defineProperties(extend(BooleanType.prototype, Boolean.prototype), {
	$create: d(Boolean),
	validateCreate: d(function (value) { return null; })
});
delete proto.toString;
proto._toString.$$setValue(function () {
	return this.valueOf() ? this.ns.trueString : this.ns.falseString;
});

// Properties
StringType = require('./string');
rel = BooleanType.get('trueString');
rel.$$setValue('True');
rel._ns.$$setValue(StringType);
rel._required.$$setValue(true);

rel = BooleanType.get('falseString');
rel.$$setValue('False');
rel._ns.$$setValue(StringType);
rel._required.$$setValue(true);<commit_msg>Rename true/falseString to true/falseLabel<commit_after>'use strict';

var d          = require('es5-ext/lib/Object/descriptor')
  , extend     = require('es5-ext/lib/Object/extend-properties')
  , Base       = require('./base')

  , defineProperties = Object.defineProperties

  , BooleanType, proto, StringType, rel;

// Setup
module.exports = BooleanType = extend(Base.$$create('Boolean'), Boolean);
defineProperties(BooleanType, {
	_serialize_: d('c', function (value) { return '1' + Number(value); })
});
BooleanType._is.$$setValue(function (value) {
	return (typeof value === 'boolean');
});
BooleanType._normalize.$$setValue(Boolean);

proto = defineProperties(extend(BooleanType.prototype, Boolean.prototype), {
	$create: d(Boolean),
	validateCreate: d(function (value) { return null; })
});
delete proto.toString;
proto._toString.$$setValue(function () {
	return this.valueOf() ? this.ns.trueString : this.ns.falseString;
});

// Properties
StringType = require('./string');
rel = BooleanType.get('trueLabel');
rel.$$setValue('True');
rel._ns.$$setValue(StringType);
rel._required.$$setValue(true);

rel = BooleanType.get('falseLabel');
rel.$$setValue('False');
rel._ns.$$setValue(StringType);
rel._required.$$setValue(true);
{'fraction_non_alphanumeric': 0.18271200327734535, 'fraction_numerical': 0.0024580090126997134, 'mean_word_length': 5.6, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '1960507', 'n_tokens_mistral': 735, 'n_tokens_neox': 726, 'n_words': 132}