{"_id":"4chan-ts","_rev":"5-17b40275e63ff5479a9617ba1df66892","name":"4chan-ts","dist-tags":{"latest":"0.1.0"},"versions":{"0.0.1":{"name":"4chan-ts","version":"0.0.1","keywords":["4chan","4chan types","4chan api","4chan api typescript"],"author":{"name":"3IMAD"},"license":"MIT","_id":"4chan-ts@0.0.1","maintainers":[{"name":"3imad","email":"dhaimy.imad@gmail.com"}],"homepage":"https://github.com/3IMAD69/4chan-ts#readme","bugs":{"url":"https://github.com/3IMAD69/4chan-ts/issues"},"dist":{"shasum":"33359b801c6e51468fc82ddad35179b5da1e7197","tarball":"https://registry.npmjs.org/4chan-ts/-/4chan-ts-0.0.1.tgz","fileCount":7,"integrity":"sha512-acW21POsQA5fiyOVcy/Se0lORlDr2207zx39S1VYWCo0gB5qVZthJFZR/hNiy91x/uMcSoBtWGTlsPPSSGj3dA==","signatures":[{"sig":"MEYCIQCnvsvre9S249oRR7NZI8DNPgk4fsvj3bP/ZsFpVJedVQIhAMShS5cAh76eEBAvMXX+FPlShbSdrUEhkJgrbnIfnBBR","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":25826},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"index.ts","gitHead":"2a460a49e904555e2d24b398952898a0e76c490c","scripts":{"build":"bun build --target=node ./src/index.ts --outfile=dist/index.js && bun run build:declaration","postbuild":"rimraf tsconfig.types.tsbuildinfo","build:declaration":"tsc --emitDeclarationOnly --project tsconfig.types.json"},"_npmUser":{"name":"3imad","email":"dhaimy.imad@gmail.com"},"repository":{"url":"git+https://github.com/3IMAD69/4chan-ts.git","type":"git"},"_npmVersion":"10.9.0","description":"A typescript client wrapper for 4chan api","directories":{},"_nodeVersion":"22.11.0","dependencies":{"@better-fetch/fetch":"^1.1.18"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"^6.0.1","prettier":"^3.5.3","bun-types":"^1.2.12","@types/bun":"latest"},"peerDependencies":{"typescript":"^5.8.3"},"_npmOperationalInternal":{"tmp":"tmp/4chan-ts_0.0.1_1746400331169_0.6649188806802371","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"4chan-ts","version":"0.0.2","keywords":["4chan","4chan types","4chan api","4chan api typescript"],"author":{"name":"3IMAD"},"license":"MIT","_id":"4chan-ts@0.0.2","maintainers":[{"name":"3imad","email":"dhaimy.imad@gmail.com"}],"homepage":"https://github.com/3IMAD69/4chan-ts#readme","bugs":{"url":"https://github.com/3IMAD69/4chan-ts/issues"},"dist":{"shasum":"48e11ce2eb287bed9f17bafbb82467929281740a","tarball":"https://registry.npmjs.org/4chan-ts/-/4chan-ts-0.0.2.tgz","fileCount":7,"integrity":"sha512-6m5MEv1q4nbdZO+/YCOfcM5VGMp8p2RBmCer9SSpmPX0COjC7xlR9uMQU8SuuGmfqPh9bSNzHNYpG248u1g62w==","signatures":[{"sig":"MEQCIDZyz2BQ6Owbu4+DTIfIBzVYLi0kp8Qcm3sbcKxx4RUnAiAB5QScCdc2NdyWOrxAR1R4RqLiMHMX6p16ANjjHNWRUA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":26456},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"index.ts","gitHead":"f120139905ee66ac3a3a0ddb6ca1f09db32aa6d8","scripts":{"build":"bun build --target=node ./src/index.ts --outfile=dist/index.js && bun run build:declaration","postbuild":"rimraf tsconfig.types.tsbuildinfo","build:declaration":"tsc --emitDeclarationOnly --project tsconfig.types.json"},"_npmUser":{"name":"3imad","email":"dhaimy.imad@gmail.com"},"repository":{"url":"git+https://github.com/3IMAD69/4chan-ts.git","type":"git"},"_npmVersion":"10.9.0","description":"A typescript client wrapper for 4chan api","directories":{},"_nodeVersion":"22.11.0","dependencies":{"@better-fetch/fetch":"^1.1.18"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"^6.0.1","prettier":"^3.5.3","bun-types":"^1.2.12","@types/bun":"latest"},"peerDependencies":{"typescript":"^5.8.3"},"_npmOperationalInternal":{"tmp":"tmp/4chan-ts_0.0.2_1746443426516_0.7307682823307582","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"4chan-ts","version":"0.0.3","keywords":["4chan","4chan types","4chan api","4chan api typescript"],"author":{"name":"3IMAD"},"license":"MIT","_id":"4chan-ts@0.0.3","maintainers":[{"name":"3imad","email":"dhaimy.imad@gmail.com"}],"homepage":"https://github.com/3IMAD69/4chan-ts#readme","bugs":{"url":"https://github.com/3IMAD69/4chan-ts/issues"},"dist":{"shasum":"34cefd34ce15301f964820fd2033a957d56d3b0a","tarball":"https://registry.npmjs.org/4chan-ts/-/4chan-ts-0.0.3.tgz","fileCount":7,"integrity":"sha512-G2z+cn/vRhFTIvSBoXlbENaM5oWPE6q5/irImW9gMZGLiHTNzmeQ9oKhzUcFc+z9zqCNo7ws1Q2B6WnrLk8H6w==","signatures":[{"sig":"MEQCIEhQniHo4/BcixfP60peRU3mcGyQL/O83N0I2v3x0QgXAiA0DYn6bpPqmjJhQAafue7lk6aUbimMhtSRLj7q5REoFA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":26458},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"index.ts","gitHead":"ce8cdc49450064ca5bbbba2815641c617b579fe9","scripts":{"build":"bun build --target=node ./src/index.ts --outfile=dist/index.js && bun run build:declaration","postbuild":"rimraf tsconfig.types.tsbuildinfo","build:declaration":"tsc --emitDeclarationOnly --project tsconfig.types.json"},"_npmUser":{"name":"3imad","email":"dhaimy.imad@gmail.com"},"repository":{"url":"git+https://github.com/3IMAD69/4chan-ts.git","type":"git"},"_npmVersion":"10.9.0","description":"A typescript client wrapper for 4chan api","directories":{},"_nodeVersion":"22.11.0","dependencies":{"@better-fetch/fetch":"^1.1.18"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"^6.0.1","prettier":"^3.5.3","bun-types":"^1.2.12","@types/bun":"latest"},"peerDependencies":{"typescript":"^5.8.3"},"_npmOperationalInternal":{"tmp":"tmp/4chan-ts_0.0.3_1746639398434_0.8488596304605973","host":"s3://npm-registry-packages-npm-production"}},"0.0.4":{"name":"4chan-ts","version":"0.0.4","keywords":["4chan","4chan types","4chan api","4chan api typescript"],"author":{"name":"3IMAD"},"license":"MIT","_id":"4chan-ts@0.0.4","maintainers":[{"name":"3imad","email":"dhaimy.imad@gmail.com"}],"homepage":"https://github.com/3IMAD69/4chan-ts#readme","bugs":{"url":"https://github.com/3IMAD69/4chan-ts/issues"},"dist":{"shasum":"ea728bf2699f98e6a00dcf9e4f896204b1d4b9d4","tarball":"https://registry.npmjs.org/4chan-ts/-/4chan-ts-0.0.4.tgz","fileCount":7,"integrity":"sha512-9uXXlez4aH90ydlTSKZTpEClyciNlphtFSd+Q0KmMshO7rn5hMnHHU6xVgtfb1uMH5IcdcA1x+uB5B/Rfsj60A==","signatures":[{"sig":"MEQCIGCwVUBhXk+VYsZCrJ5nioT4YtFQb/f1pdNArwFq9au8AiBzaJGbMfwl93mEErIj86GlUCIfM6KUbM54nkg2fd3SVg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":26418},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"index.ts","gitHead":"ce8cdc49450064ca5bbbba2815641c617b579fe9","scripts":{"build":"bun build --target=node ./src/index.ts --outfile=dist/index.js && bun run build:declaration","postbuild":"rimraf tsconfig.types.tsbuildinfo","build:declaration":"tsc --emitDeclarationOnly --project tsconfig.types.json"},"_npmUser":{"name":"3imad","email":"dhaimy.imad@gmail.com"},"repository":{"url":"git+https://github.com/3IMAD69/4chan-ts.git","type":"git"},"_npmVersion":"10.9.0","description":"A typescript client wrapper for 4chan api","directories":{},"_nodeVersion":"22.11.0","dependencies":{"@better-fetch/fetch":"^1.1.18"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"^6.0.1","prettier":"^3.5.3","bun-types":"^1.2.12","@types/bun":"latest"},"peerDependencies":{"typescript":"^5.8.3"},"_npmOperationalInternal":{"tmp":"tmp/4chan-ts_0.0.4_1746639611743_0.9153816491145277","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"4chan-ts","module":"index.ts","main":"dist/index.js","types":"dist/index.d.ts","type":"module","version":"0.1.0","description":"A typescript client wrapper for 4chan api","scripts":{"build":"bun build --target=node ./src/index.ts --outfile=dist/index.js && bun run build:declaration","build:declaration":"tsc --emitDeclarationOnly --project tsconfig.types.json","postbuild":"rimraf tsconfig.types.tsbuildinfo","test":"bun test","publish":"bun run build && npm publish"},"devDependencies":{"@types/bun":"latest","bun-types":"^1.2.12","prettier":"^3.5.3","rimraf":"^6.0.1"},"peerDependencies":{"typescript":"^5.8.3"},"dependencies":{"@better-fetch/fetch":"^1.1.18"},"repository":{"type":"git","url":"git+https://github.com/3IMAD69/4chan-ts.git"},"keywords":["4chan","4chan types","4chan api","4chan api typescript"],"author":{"name":"3IMAD"},"license":"MIT","gitHead":"0496f3d33069abe5c603fb2ec1bfeeca74eb539b","_id":"4chan-ts@0.1.0","bugs":{"url":"https://github.com/3IMAD69/4chan-ts/issues"},"homepage":"https://github.com/3IMAD69/4chan-ts#readme","_nodeVersion":"25.0.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-eh3+N4+dUjzdBWIx3tKHs+DZPVMkcjn+hdK7r030AtyN3m/frW/hwTqyqredYMQxMF3b//6st7+VUIMdy5wLuA==","shasum":"6e170626fa7919e27be55ff7ba67094ca91005b5","tarball":"https://registry.npmjs.org/4chan-ts/-/4chan-ts-0.1.0.tgz","fileCount":7,"unpackedSize":28583,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGcCIuwhSQ9KG1IRDlipzX+oI6b2wp2+2Iag5TyhI+1BAiB9H97wMW+NCtSjOXRbkvibN7vp8hqTYxvADw0+C5V4vg=="}]},"_npmUser":{"name":"3imad","email":"dhaimy.imad@gmail.com"},"directories":{},"maintainers":[{"name":"3imad","email":"dhaimy.imad@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/4chan-ts_0.1.0_1785597270995_0.04887971747116393"},"_hasShrinkwrap":false}},"time":{"created":"2025-05-04T23:12:11.167Z","modified":"2026-08-01T15:14:31.277Z","0.0.1":"2025-05-04T23:12:11.348Z","0.0.2":"2025-05-05T11:10:26.696Z","0.0.3":"2025-05-07T17:36:38.613Z","0.0.4":"2025-05-07T17:40:11.949Z","0.1.0":"2026-08-01T15:14:31.137Z"},"bugs":{"url":"https://github.com/3IMAD69/4chan-ts/issues"},"author":{"name":"3IMAD"},"license":"MIT","homepage":"https://github.com/3IMAD69/4chan-ts#readme","keywords":["4chan","4chan types","4chan api","4chan api typescript"],"repository":{"type":"git","url":"git+https://github.com/3IMAD69/4chan-ts.git"},"description":"A typescript client wrapper for 4chan api","maintainers":[{"name":"3imad","email":"dhaimy.imad@gmail.com"}],"readme":"# 4chan-ts\n\nA modern and typed 4chan API wrapper written in TypeScript.\n\nThis package provides simple access to [4chan's public JSON API](https://github.com/4chan/4chan-API), supporting boards, threads, and posts with full type safety.\n\n## ✨ Features\n\n- 🌀 Supports all public endpoints of the 4chan API\n- ⚡ Built in TypeScript for type safety and modern dev experience\n- 🧪 Lightweight\n- 🚀 Bun-first, Node/npm-compatible\n- ⏱️ Configurable request timeout\n- 📦 Conditional requests using `If-Modified-Since`\n\n---\n\n## 📦 Installation\n\n### Using [Bun](https://bun.sh)\n\n```bash\nbun add 4chan-ts\n```\n\n### Using [NPM]\n\n```bash\nnpm install 4chan-ts\n```\n\n### Quick Start\n\n```ts\nimport { FourChanClient } from \"4chan-ts\";\n\n(async () => {\n  const chan = new FourChanClient({ timeout: 15_000 });\n\n  const { data, error } = await chan.getBoards();\n  if (error) {\n    console.error(error);\n    return;\n  }\n  console.log(data); // const data: BoardList\n})();\n```\n\nReuse the same `FourChanClient` instance for repeated requests. It keeps the\nlatest successful response and its `Last-Modified` value per endpoint, sends\n`If-Modified-Since` on later requests, and returns the cached data when 4chan\nresponds with `304 Not Modified`.\n","readmeFilename":"README.md"}