Skip to content

Commit

Permalink
feat(efficiency): increase maximum tweet length to 250 from 240
Browse files Browse the repository at this point in the history
  • Loading branch information
dezren39 committed Sep 16, 2020
1 parent f49441c commit f35cb1f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const parse = (content) => typeof content === 'undefined' || content === null ||
.flat(Infinity)
.map((x) => {
console.dir(
[x, TwitterText.parseTweet(x).permillage * 0.28, chunk(x.replaceAll(/\s\n\s/g, ' \n'), 240, { 'charLengthMask': 0, 'charLengthType': 'TextEncoder', 'textEncoder':
[x, TwitterText.parseTweet(x).permillage * 0.28, chunk(x.replaceAll(/\s\n\s/g, ' \n'), 250, { 'charLengthMask': 0, 'charLengthType': 'TextEncoder', 'textEncoder':
{
encode : (text) => {
return { length: TwitterText.parseTweet(text).permillage * 0.28 };
Expand All @@ -49,7 +49,7 @@ const parse = (content) => typeof content === 'undefined' || content === null ||
}
}).map(y => TwitterText.parseTweet(y).permillage * 0.28 ),
], {depth: null});
return chunk(x.replaceAll(/\s\n\s/g, ' \n'), 240, { 'charLengthMask': 0, 'charLengthType': 'TextEncoder', 'textEncoder':
return chunk(x.replaceAll(/\s\n\s/g, ' \n'), 250, { 'charLengthMask': 0, 'charLengthType': 'TextEncoder', 'textEncoder':
{
encode : (text) => {
return { length: TwitterText.parseTweet(text).permillage * 0.28 };
Expand Down

0 comments on commit f35cb1f

Please sign in to comment.