Most downloaded npm package of the month
cross-posted from: https://piefed.world/c/shit/p/1258949/most-downloaded-npm-package-of-the-month
SVG Code
.bg { fill: #0a0a0a; }
.window-bg { fill: #16161a; }
.window-border { stroke: #333333; stroke-width: 1.5; }
.header-line { stroke: #333333; stroke-width: 1; }
.title { font-family: -apple-system, BlinkMacSystemFont, “Segoe UI”, Roboto, Helvetica, Arial, sans-serif; font-size: 38px; font-weight: 800; fill: #ffffff; text-anchor: middle; }
.tab-text { font-family: -apple-system, BlinkMacSystemFont, “Segoe UI”, Roboto, sans-serif; font-size: 13px; fill: #cccccc; }
.tab-js { fill: #f7df1e; font-weight: bold; }
.tab-close { fill: #858585; font-size: 14px; }
.code-text { font-family: 'Consolas', 'Courier New', monospace; font-size: 15px; fill: #d4d4d4; }
.line-num { fill: #6e7681; text-anchor: end; font-size: 14px; }
.kw-purple { fill: #c678dd; }
.kw-blue { fill: #569cd6; }
.func-yellow { fill: #dcdcaa; }
.var-blue { fill: #9cdcfe; }
.class-teal { fill: #4ec9b0; }
.str-orange { fill: #ce9178; }
.num-green { fill: #b5cea8; }
.punct { fill: #d4d4d4; }
<!– ==================== 2022 Section ==================== –>
coding in 2022
<!– Window Container –>
JS stringUtils.js ×
1
function startsWithCapitalLetter(str) {
2
return str.length > ソ 0 && str[0] === str[0].toUpperCase();
3
}
<!– ==================== 2027 Section ==================== –>
coding in 2027
<!– Window Container –>
JS stringUtils.js ×
1
import Anthropic from '@anthropic-ai/sdk';
2
3
const anthropic = new Anthropic({
4
apiKey: process.env.ANTHROPIC_API_KEY,
5
});
6
7
export async function startsWithCapitalLetter(str) {
8
const prompt = `You are a capitalization expert.
9
You have been studying capitalization for years
10
11
Text to analyze: """"""${str}""""""
12
13
Respond with ONLY 'true' or 'false'.
14
Is the first letter of the text a capital letter?`;
15
16
const response = await anthropic.messages.create({
17
model: 'claude-mythos-1-20261225',
18
max_tokens: 5000000,
19
temperature: 0,
20
thinking: 'ultramaxmegathink',
21
messages: [{ role: 'user', content: prompt }],
22
});
23
24
const answer = response.content[0].text.trim().toLowerCase();
25
return answer === 'true';
26
}