Download seeds/javascript_starter.py from ModhiSathvik/diffuzamba-phase2-pipeline: direct link, hf CLI and curl.
- Browser
- Download file 14.8 kB
-
https://huggingface.co/datasets/ModhiSathvik/diffuzamba-phase2-pipeline/resolve/main/seeds/javascript_starter.py
- Command line
-
hf download hf://datasets/ModhiSathvik/diffuzamba-phase2-pipeline/seeds/javascript_starter.py
-
curl -L -o javascript_starter.py https://huggingface.co/datasets/ModhiSathvik/diffuzamba-phase2-pipeline/resolve/main/seeds/javascript_starter.py
14.8 kB
| # JavaScript starter seeds for topic expansion. | |
| # Mirrors python_starter structure; topics are JS-native. | |
| STARTER = [ | |
| # ββ BASICS ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| "var, let, const: scoping rules and TDZ", | |
| "primitive types vs reference types and the equality traps", | |
| "type coercion rules: == vs ===, falsy values", | |
| "template literals and tagged templates", | |
| "destructuring objects and arrays with defaults", | |
| "spread and rest operators in arguments and arrays", | |
| "optional chaining (?.) and nullish coalescing (??)", | |
| "logical assignment operators: ||=, &&=, ??=", | |
| "block scope, function scope, and module scope", | |
| "hoisting of var, let, const, and function declarations", | |
| "the temporal dead zone explained", | |
| "implicit type conversion in arithmetic and comparison", | |
| "Number.isNaN, Number.isFinite vs the global versions", | |
| "Number precision: 0.1 + 0.2 problem and BigInt", | |
| "string methods: slice, substring, substr, split, trim", | |
| "String.raw and escape sequences", | |
| "Array.from, Array.of, Array.isArray", | |
| "array methods: map, filter, reduce, flat, flatMap, find, findIndex", | |
| "array methods: some, every, includes, indexOf", | |
| "Array.sort: stable sort and locale comparison", | |
| "for...of vs for...in vs forEach: when to use which", | |
| "iterating Maps and Sets with for...of", | |
| "the iterator protocol and Symbol.iterator", | |
| "creating objects: literals, Object.create, class", | |
| "object property shorthand and computed property names", | |
| "Object.keys, Object.values, Object.entries, Object.fromEntries", | |
| "object spread for shallow copy and merge", | |
| "Object.assign vs spread for object copying", | |
| "JSON.stringify with replacer and JSON.parse with reviver", | |
| "JSON.stringify of dates, undefined, functions, BigInt", | |
| "Map and Set: when to prefer them over object/array", | |
| "WeakMap and WeakSet for memory-friendly caches", | |
| "function declarations vs function expressions vs arrow functions", | |
| "arrow functions and 'this' lexical binding", | |
| "default parameter values and the arguments object", | |
| "rest parameters in function signatures", | |
| "named exports vs default exports in ESM", | |
| "import statements: named, default, namespace, dynamic", | |
| "CommonJS module.exports vs ESM export", | |
| "ESM vs CJS interop pitfalls in Node.js", | |
| "if/else, ternary, and logical operators for control flow", | |
| "switch statements and the fall-through gotcha", | |
| "try/catch/finally and the optional binding (3rd arg)", | |
| "throwing errors: Error, TypeError, RangeError, custom Error subclasses", | |
| "Error.cause for exception chaining (ES2022)", | |
| "labeled statements and break/continue with labels", | |
| "regular expressions: literal syntax vs RegExp constructor", | |
| "regex flags: g, i, m, s, u, y and what each does", | |
| "regex methods: test, exec, match, matchAll, replace, replaceAll", | |
| "Date object basics and date arithmetic", | |
| "Intl.DateTimeFormat and Intl.NumberFormat for i18n", | |
| # ββ INTERMEDIATE ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| "the event loop, call stack, microtask queue, macrotask queue", | |
| "process.nextTick vs setImmediate vs setTimeout in Node", | |
| "Promises: then, catch, finally, and chaining", | |
| "Promise.all, Promise.race, Promise.allSettled, Promise.any", | |
| "creating promises with the Promise constructor", | |
| "async/await and the rules of error propagation", | |
| "top-level await in ESM modules", | |
| "for-await-of for async iteration", | |
| "async generators with yield in async functions", | |
| "AbortController and AbortSignal for cancellation", | |
| "fetch API: basic GET, POST, headers, body", | |
| "fetch with FormData and multipart uploads", | |
| "fetch streaming responses with ReadableStream", | |
| "fetch error handling: response.ok and try/catch", | |
| "node:fs/promises vs callback fs", | |
| "fs.createReadStream and pipe to writers", | |
| "node:path utilities: join, resolve, parse, extname", | |
| "node:url: URL class, URLSearchParams", | |
| "node:stream: Readable, Writable, Transform, Duplex", | |
| "node:events: EventEmitter, on, once, off, removeAllListeners", | |
| "node:crypto: createHash, createHmac, randomBytes, scryptSync", | |
| "node:child_process: spawn, exec, execFile, fork", | |
| "node:worker_threads for parallelism", | |
| "node:cluster for multi-core scaling", | |
| "process.argv, process.env, process.exit", | |
| "buffer module: Buffer.from, Buffer.alloc, encoding", | |
| "TextEncoder and TextDecoder for Uint8Array <-> string", | |
| "ArrayBuffer, DataView, and typed arrays", | |
| "classes: constructor, methods, getters, setters", | |
| "private class fields with # prefix", | |
| "static class members and static blocks", | |
| "extends and super: subclassing and method override", | |
| "instanceof, Symbol.hasInstance, and prototype chain", | |
| "Object.getPrototypeOf and Object.setPrototypeOf", | |
| "Object.defineProperty and property descriptors", | |
| "Proxy: get, set, has, deleteProperty traps", | |
| "Reflect API parallels with Proxy traps", | |
| "Symbol primitive type and well-known symbols", | |
| "Symbol.iterator, Symbol.asyncIterator", | |
| "generators with function*: yield and yield*", | |
| "generator delegation patterns", | |
| "closures and free variables", | |
| "the IIFE pattern and module patterns pre-ES2015", | |
| "currying and partial application in JS", | |
| "function.prototype.bind, call, apply", | |
| "WeakRef and FinalizationRegistry", | |
| "structuredClone for deep cloning (ES2022)", | |
| "Promise.withResolvers (ES2024)", | |
| "Object.hasOwn vs hasOwnProperty", | |
| "Array.prototype.at for negative indexing", | |
| "Array.prototype.findLast and findLastIndex", | |
| "Array grouping with Object.groupBy and Map.groupBy", | |
| "Promise unhandled rejection handling", | |
| "process.on('uncaughtException') for last-resort error handling", | |
| "graceful shutdown patterns: SIGTERM, SIGINT handling", | |
| "console: log, debug, info, warn, error, table, group, time", | |
| "console.assert and console.dir", | |
| "performance.now and performance marks/measures", | |
| "Object freeze, seal, preventExtensions", | |
| "deep equality: writing your own and using libraries", | |
| "shallow copy vs deep copy semantics", | |
| # ββ TESTING / TOOLING (intermediate) ββββββββββββββββββββββββββββββββββββββ | |
| "Jest test setup: describe, it, beforeEach, afterEach", | |
| "Jest matchers: toBe, toEqual, toMatchObject, toHaveBeenCalled", | |
| "Jest mocking: jest.fn, jest.mock, mockImplementation", | |
| "Jest async tests with done, return promise, async/await", | |
| "Vitest as a faster Jest alternative", | |
| "node:test: built-in test runner", | |
| "snapshot testing patterns", | |
| "ESLint configuration with flat config (eslint.config.js)", | |
| "Prettier integration with ESLint", | |
| "TypeScript basics: types, interfaces, type aliases", | |
| "TypeScript: union, intersection, literal, conditional types", | |
| "TypeScript generics: Function, type, class generics", | |
| "tsconfig.json key options: target, module, strict, paths", | |
| "type narrowing with typeof, instanceof, in, type predicates", | |
| "TypeScript utility types: Partial, Required, Pick, Omit, Record", | |
| "package.json: dependencies, devDependencies, peerDependencies", | |
| "package.json scripts and lifecycle hooks", | |
| "npm vs pnpm vs yarn vs bun: when each matters", | |
| "monorepo with pnpm workspaces", | |
| "esbuild for fast bundling", | |
| "tsup for library bundling", | |
| "Vite for dev server and bundling", | |
| "Webpack basics and tree shaking", | |
| "Rollup for library bundling", | |
| # ββ ADVANCED ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| "V8 hidden classes and inline caches", | |
| "V8 garbage collection: young generation vs old generation", | |
| "memory leaks in JS: closures, listeners, detached DOM", | |
| "performance profiling with Chrome DevTools Performance tab", | |
| "Node.js --inspect flag and Chrome DevTools debugging", | |
| "writing C++ addons with N-API", | |
| "the V8 engine architecture overview", | |
| "JIT compilation in V8: Ignition, TurboFan, Sparkplug", | |
| "WeakRef use cases and pitfalls", | |
| "FinalizationRegistry semantics", | |
| "shared memory with SharedArrayBuffer and Atomics", | |
| "thread safety and Atomics.wait/notify", | |
| "reactive patterns with Observables (RxJS introduction)", | |
| "Web Workers: dedicated, shared, and service workers", | |
| "service worker lifecycle and caching strategies", | |
| "the Cache API and offline-first patterns", | |
| "WebSockets: client-side ws lifecycle and reconnection", | |
| "ws library for Node.js WebSocket servers", | |
| "Server-Sent Events vs WebSockets vs polling", | |
| "HTTP/2 and HTTP/3 in Node.js", | |
| "TLS/SSL: https module, custom CAs, mutual TLS", | |
| "Node.js cluster mode and graceful reload", | |
| "process management with PM2", | |
| "writing native ESM packages with .mjs and 'type: module'", | |
| "dual-package CJS+ESM with package.json exports field", | |
| "package.json exports for conditional resolution", | |
| "subpath imports with package.json imports field", | |
| "import maps in browsers", | |
| "tree shaking and sideEffects in package.json", | |
| "bundling for browser: Vite, Webpack, esbuild, Rollup", | |
| "code splitting: dynamic import() boundaries", | |
| "lazy loading routes with React.lazy or Vue defineAsyncComponent", | |
| "React: function components and hooks (useState, useEffect)", | |
| "React: useMemo, useCallback, and avoiding unnecessary renders", | |
| "React: useContext for state sharing", | |
| "React: useReducer vs useState", | |
| "React: Suspense for data fetching boundaries", | |
| "React Server Components vs client components in Next.js", | |
| "Next.js App Router: server actions and form handling", | |
| "Vue 3: Composition API with ref, reactive, computed", | |
| "Vue 3: provide/inject for cross-component state", | |
| "Svelte 5 runes: $state, $derived, $effect", | |
| "SolidJS fine-grained reactivity", | |
| "Express middleware patterns and order of execution", | |
| "Express error-handling middleware (4-arg signature)", | |
| "Fastify schema validation and serialization", | |
| "Hono for edge runtimes", | |
| "Koa middleware with async/await", | |
| "request validation with zod or joi", | |
| "JSON Web Tokens: signing, verifying, refresh patterns", | |
| "OAuth 2.0 authorization code flow in Node", | |
| "session-based auth with express-session", | |
| "rate limiting with express-rate-limit or in-memory leaky bucket", | |
| "CORS configuration: origins, credentials, preflight", | |
| "CSRF protection patterns with SameSite cookies", | |
| "bcrypt vs argon2 for password hashing", | |
| "constant-time comparison with crypto.timingSafeEqual", | |
| "input validation and SQL injection prevention", | |
| "node:sqlite3 and better-sqlite3 patterns", | |
| "Postgres with pg: pool, transactions, prepared statements", | |
| "Postgres with postgres.js (porsager/postgres)", | |
| "Drizzle ORM: schema, queries, migrations", | |
| "Prisma: schema, generated client, migrations", | |
| "MongoDB with the official driver: connection, queries, indexes", | |
| "Redis with ioredis: pub/sub, scripts, pipelines", | |
| "BullMQ for Redis-backed job queues", | |
| "Kafka client (kafkajs): producers, consumers, transactions", | |
| "gRPC in Node with @grpc/grpc-js", | |
| "GraphQL: Apollo Server, schema-first vs code-first", | |
| "GraphQL DataLoader for batching", | |
| "URQL or Apollo Client on the frontend", | |
| "MSW (Mock Service Worker) for testing", | |
| "Playwright for browser automation and E2E tests", | |
| "Cypress component and E2E testing", | |
| "Lighthouse and Web Vitals monitoring", | |
| "OpenTelemetry tracing in Node services", | |
| "structured logging with pino", | |
| "Winston logger with custom transports", | |
| "Sentry error tracking integration", | |
| "feature flags with environment variables and unleash", | |
| "edge runtimes: Cloudflare Workers, Vercel Edge", | |
| "Deno-specific APIs: Deno.serve, Deno.permissions", | |
| "Bun-specific APIs: Bun.serve, Bun.write", | |
| "WebAssembly modules in JS: instantiate, import", | |
| "Node.js permission model (--experimental-permission)", | |
| "Node.js single executable applications (SEA)", | |
| "diagnostic_channel for instrumentation hooks", | |
| "async hooks for context propagation", | |
| "AsyncLocalStorage for request-scoped data", | |
| "PerformanceObserver for runtime metrics", | |
| "cluster module: master/worker IPC patterns", | |
| "child_process IPC: send and message events", | |
| "worker_threads with MessageChannel for transferable objects", | |
| "Iterator helpers proposal: .map, .filter, .take on iterators", | |
| "Records and Tuples proposal (#{} and #[])", | |
| "Pipeline operator proposal (|>)", | |
| "decorators (Stage 3): class and method decorators", | |
| "Temporal API: PlainDate, ZonedDateTime, Duration", | |
| "ECMAScript modules in browsers: import maps, integrity", | |
| "import attributes for JSON/CSS modules", | |
| "private methods and accessors with # syntax", | |
| "weakly-held references in event listeners", | |
| "DOM event delegation patterns", | |
| "MutationObserver and IntersectionObserver", | |
| "ResizeObserver for responsive components", | |
| "the History API: pushState, replaceState, popstate", | |
| "Storage APIs: localStorage, sessionStorage, IndexedDB", | |
| "IndexedDB with idb library for ergonomic API", | |
| "the Fetch + AbortController pattern for cancelable requests", | |
| "Streams API: ReadableStream, WritableStream, TransformStream", | |
| "the File System Access API", | |
| "Web Locks API for cross-tab coordination", | |
| "BroadcastChannel for tab-to-tab messaging", | |
| "the Clipboard API and permissions", | |
| "navigator.permissions and the Permissions API", | |
| "Page Visibility API and Idle Detection", | |
| "WebAuthn for passkey-based authentication", | |
| "Subresource Integrity for script tags", | |
| "Content Security Policy (CSP) headers", | |
| "Trusted Types for DOM XSS prevention", | |
| "service worker for push notifications", | |
| "background sync API", | |
| "WebRTC: peer connection, data channels, media streams", | |
| "MediaDevices API: getUserMedia, getDisplayMedia", | |
| "Web Audio API: AudioContext, nodes, scheduling", | |
| "Canvas 2D and WebGL basics in JS", | |
| "Animation API: requestAnimationFrame patterns", | |
| "Web Animations API for declarative animations", | |
| "passive event listeners for scroll performance", | |
| "the Beacon API for analytics on unload", | |
| ] | |