Skip to content

Instantly share code, notes, and snippets.

View bernardobelchior's full-sized avatar

Bernardo Belchior bernardobelchior

View GitHub Profile
module.exports = function (RED) {
var LowerCaseNode = /** @class */ (function () {
function LowerCaseNode(config) {
RED.nodes.createNode(this, config);
this.on('input', function (msg) {
msg.payload = msg.payload.toLowerCase();
this.send(msg);
});
}
return LowerCaseNode;
@bernardobelchior
bernardobelchior / npm-downloads.ts
Last active June 18, 2025 10:19
NPM download breakdown by version
#!/usr/bin/env node
interface DownloadsResponse {
downloads: Record<string, number>;
}
interface MajorVersionData {
majorVersion: string;
totalDownloads: number;
versions: string[];