<commit_before>/**
 * Handy utilities
 */
var moment = require('moment-timezone');

function isDefined(obj) {
    return (typeof obj !== 'undefined');
}

function isSet(obj) {
    return (typeof obj !== 'undefined') && (obj !== null);
}

function isString(obj) {
    return (typeof obj === 'string' || obj instanceof String);
}

function isFunction(obj) {
    return (typeof (obj) === 'function');
}

function isEmptyString(str) {
    return (!str);
}

function isNumber(n) {
  return !isNaN(parseFloat(n)) && isFinite(n);
}

function isExistenceNUniqueness(array){
    return array.length === 1;
}

function isExistence(array){
    return array.length >= 1;
}

function getTWCurrentTime(){
    return moment().tz('Asia/Taipei').format('MM Do YYYY, hh:mm:ss a ZZ')
}

module.exports = {
    isDefined : isDefined,
    isSet : isSet,
    isString : isString,
    isFunction : isFunction,
    isEmptyString : isEmptyString,
		isNumber : isNumber,
		isExistenceNUniqueness : isExistenceNUniqueness,
    isExistence : isExistence,
		getTWCurrentTime : getTWCurrentTime
};<commit_msg>[Minor Revision] Fix some format issue<commit_after>/**
 * Handy utilities
 */
var moment = require('moment-timezone');

function isDefined(obj) {
    return (typeof obj !== 'undefined');
}

function isSet(obj) {
    return (typeof obj !== 'undefined') && (obj !== null);
}

function isString(obj) {
    return (typeof obj === 'string' || obj instanceof String);
}

function isFunction(obj) {
    return (typeof(obj) === 'function');
}

function isEmptyString(str) {
    return (!str);
}

function isNumber(n) {
    return !isNaN(parseFloat(n)) && isFinite(n);
}

function isExistenceNUniqueness(array) {
    return array.length === 1;
}

function isExistence(array) {
    return array.length >= 1;
}

function getTWCurrentTime() {
    return moment().tz('Asia/Taipei').format('MM Do YYYY, hh:mm:ss a ZZ')
}
module.exports = {
    isDefined: isDefined,
    isSet: isSet,
    isString: isString,
    isFunction: isFunction,
    isEmptyString: isEmptyString,
    isNumber: isNumber,
    isExistenceNUniqueness: isExistenceNUniqueness,
    isExistence: isExistence,
    getTWCurrentTime: getTWCurrentTime
};
{'fraction_non_alphanumeric': 0.14383875400824553, 'fraction_numerical': 0.0018323408153916628, 'mean_word_length': 4.22488038277512, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6366487', 'n_tokens_mistral': 747, 'n_tokens_neox': 724, 'n_words': 168}