{"id":19180572,"url":"https://github.com/leizhenpeng/nanoid-cjs","last_synced_at":"2025-05-07T22:27:59.491Z","repository":{"id":248969921,"uuid":"830363224","full_name":"Leizhenpeng/nanoid-cjs","owner":"Leizhenpeng","description":"📦 latest nanoid, but support cjs for nodejs","archived":false,"fork":false,"pushed_at":"2024-12-10T11:24:58.000Z","size":221,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-04T20:47:24.407Z","etag":null,"topics":["cjs","nanoid","nodejs"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/nanoid-cjs","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Leizhenpeng.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["leizhenpeng"],"opencollective":"leizhenpeng"}},"created_at":"2024-07-18T06:09:46.000Z","updated_at":"2025-03-01T11:13:00.000Z","dependencies_parsed_at":"2024-07-18T06:54:13.911Z","dependency_job_id":"b36e0b4c-ab96-4b3e-bc17-570fd1624b30","html_url":"https://github.com/Leizhenpeng/nanoid-cjs","commit_stats":null,"previous_names":["leizhenpeng/nanoid-cjs"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Leizhenpeng%2Fnanoid-cjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Leizhenpeng%2Fnanoid-cjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Leizhenpeng%2Fnanoid-cjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Leizhenpeng%2Fnanoid-cjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Leizhenpeng","download_url":"https://codeload.github.com/Leizhenpeng/nanoid-cjs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252964012,"owners_count":21832601,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cjs","nanoid","nodejs"],"created_at":"2024-11-09T10:50:09.126Z","updated_at":"2025-05-07T22:27:59.470Z","avatar_url":"https://github.com/Leizhenpeng.png","language":"JavaScript","funding_links":["https://github.com/sponsors/leizhenpeng","leizhenpeng"],"categories":[],"sub_categories":[],"readme":"# nanoid-cjs\n\n[![npm version][npm-version-src]][npm-version-href]\n[![npm downloads][npm-downloads-src]][npm-downloads-href]\n[![bundle][bundle-src]][bundle-href]\n[![JSDocs][jsdocs-src]][jsdocs-href]\n[![License][license-src]][license-href]\n\n\u003e Latest nanoid, but support CJS for Node.js\n\nNanoid made breaking changes in version 4 and [no longer supports CJS imports](https://github.com/ai/nanoid/issues/365).\n\nThis is a disaster for developers using older versions of Node.js, especially those working with NestJS.\n\nHere, we use the Vercel NCC compiler to compile it, perfectly supporting CJS syntax.\n\n\n```javascript\nimport { nanoid } from 'nanoid-cjs'\nmodel.id = nanoid() //=\u003e \"V1StGXR8_Z5jdHi6B-myT\"\n```\n\n```javascript\nconst { nanoid } = require('nanoid-cjs');\nnanoid()  //=\u003e \"V1StGXR8_Z5jdHi6B-myT\"\n```\n\n## License\n\n[MIT](./LICENSE) License © 2023-PRESENT [leizhenpeng](https://github.com/leizhenpeng)\n\n\u003c!-- Badges --\u003e\n\n[npm-version-src]: https://img.shields.io/npm/v/nanoid-cjs?style=flat\u0026colorA=080f12\u0026colorB=1fa669\n[npm-version-href]: https://npmjs.com/package/nanoid-cjs\n[npm-downloads-src]: https://img.shields.io/npm/dm/nanoid-cjs?style=flat\u0026colorA=080f12\u0026colorB=1fa669\n[npm-downloads-href]: https://npmjs.com/package/nanoid-cjs\n[bundle-src]: https://img.shields.io/bundlephobia/minzip/nanoid-cjs?style=flat\u0026colorA=080f12\u0026colorB=1fa669\u0026label=minzip\n[bundle-href]: https://bundlephobia.com/result?p=nanoid-cjs\n[license-src]: https://img.shields.io/github/license/leizhenpeng/nanoid-cjs.svg?style=flat\u0026colorA=080f12\u0026colorB=1fa669\n[license-href]: https://github.com/leizhenpeng/nanoid-cjs/blob/main/LICENSE\n[jsdocs-src]: https://img.shields.io/badge/jsdocs-reference-080f12?style=flat\u0026colorA=080f12\u0026colorB=1fa669\n[jsdocs-href]: https://www.jsdocs.io/package/nanoid-cjs\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleizhenpeng%2Fnanoid-cjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleizhenpeng%2Fnanoid-cjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleizhenpeng%2Fnanoid-cjs/lists"}