<commit_before>// adopted from trim-newlines <>
// Copyright (c) <NAME> <<EMAIL>> (sindresorhus.com) (MIT)

function trimNL (str) {
  return end(start(str))
}

function start (str) {
  return replace(str, /^[\r\n]+/, '')
}

function end (str) {
  return replace(str, /[\r\n]+$/, '')
}

exports.trim = trimNL
exports.start = start
exports.end = end<commit_msg>update string/trim-newlines add missing dependency, fix exports<commit_after>// adopted from trim-newlines <>
// Copyright (c) <NAME> <<EMAIL>> (sindresorhus.com) (MIT)

var replace = require('../regex/replace')

function trimNL (str) {
  return end(start(str))
}

function start (str) {
  return replace(str, /^[\r\n]+/, '')
}

function end (str) {
  return replace(str, /[\r\n]+$/, '')
}

module.exports = trimNL
module.exports.start = start
module.exports.end = end
{'fraction_non_alphanumeric': 0.19347037484885127, 'fraction_numerical': 0.0, 'mean_word_length': 4.048780487804878, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '1434599', 'n_tokens_mistral': 297, 'n_tokens_neox': 294, 'n_words': 74}