{"id":18523622,"url":"https://github.com/mongoosejs/mongoose-long","last_synced_at":"2025-04-09T11:31:42.955Z","repository":{"id":4147923,"uuid":"5261846","full_name":"mongoosejs/mongoose-long","owner":"mongoosejs","description":"Provides Number Long support for Mongoose","archived":false,"fork":false,"pushed_at":"2023-11-01T02:08:47.000Z","size":46,"stargazers_count":79,"open_issues_count":2,"forks_count":16,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-02T21:18:44.808Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/mongoosejs.png","metadata":{"files":{"readme":"README.md","changelog":"History.md","contributing":null,"funding":null,"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}},"created_at":"2012-08-01T16:43:04.000Z","updated_at":"2025-01-17T10:40:39.000Z","dependencies_parsed_at":"2023-07-06T14:31:49.428Z","dependency_job_id":"b57b9ff6-13c8-4f4b-9ddc-5d845b69b321","html_url":"https://github.com/mongoosejs/mongoose-long","commit_stats":{"total_commits":45,"total_committers":9,"mean_commits":5.0,"dds":0.5333333333333333,"last_synced_commit":"2cd24dcd6a6ac30a2d8006339c83a884fd662845"},"previous_names":["aheckmann/mongoose-long"],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongoosejs%2Fmongoose-long","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongoosejs%2Fmongoose-long/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongoosejs%2Fmongoose-long/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongoosejs%2Fmongoose-long/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mongoosejs","download_url":"https://codeload.github.com/mongoosejs/mongoose-long/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248031511,"owners_count":21036421,"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":[],"created_at":"2024-11-06T17:36:35.212Z","updated_at":"2025-04-09T11:31:41.173Z","avatar_url":"https://github.com/mongoosejs.png","language":"JavaScript","funding_links":[],"categories":["🛠 General Utilities"],"sub_categories":[],"readme":"#mongoose-long\n===============\n\nProvides Number Long support for [Mongoose](http://mongoosejs.com).\n\n[![Build Status](https://secure.travis-ci.org/aheckmann/mongoose-long.png)](http://travis-ci.org/mongoosejs/mongoose-long)\n\nExample:\n\n```js\nconst mongoose = require('mongoose')\nrequire('mongoose-long')(mongoose);\nconst {Types: {Long}} = mongoose;\n\nconst partSchema = new Schema({\n  long: {\n    type: Long,\n  }\n});\n\nconst Part = db.model('Part', partSchema);\nconst part = new Part({long: '9223372036854775806'});\n\npart.long = part.long.divide(Long.fromString('2'));\npart.save()\n```\n\n### install\n\n```\nnpm install mongoose-long\n```\n\nSee [node-mongodb-native](https://mongodb.github.io/node-mongodb-native/4.2/classes/Long.html) docs on all the `Long` methods available.\n\n[LICENSE](https://github.com/aheckmann/mongoose-long/blob/master/LICENSE)\n\n### TypeScript Usage\n\nMake sure you enable both `compilerOptions.allowSyntheticDefaultImports` and `compilerOptions.esModuleInterop` in your `tsconfig.json`.\n\n```typescript\nimport mongoose from 'mongoose';\nimport mongooseLong from 'mongoose-long';\n\nmongooseLong(mongoose);\n\nconst Long = mongoose.Schema.Types.Long;\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmongoosejs%2Fmongoose-long","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmongoosejs%2Fmongoose-long","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmongoosejs%2Fmongoose-long/lists"}