@zibuthe7j11/accusantium-exercitationem-incidunt

1.0.0 • Public • Published

#@zibuthe7j11/accusantium-exercitationem-incidunt

Provides Number Long support for Mongoose.

Build Status

Example:

const mongoose = require('mongoose')
require('@zibuthe7j11/accusantium-exercitationem-incidunt')(mongoose);
const {Types: {Long}} = mongoose;

const partSchema = new Schema({
  long: {
    type: Long,
  }
});

const Part = db.model('Part', partSchema);
const part = new Part({long: '9223372036854775806'});

part.long = part.long.divide(Long.fromString('2'));
part.save()

install

npm install @zibuthe7j11/accusantium-exercitationem-incidunt

See node-mongodb-native docs on all the Long methods available.

LICENSE

TypeScript Usage

Make sure you enable both compilerOptions.allowSyntheticDefaultImports and compilerOptions.esModuleInterop in your tsconfig.json.

import mongoose from 'mongoose';
import mongooseLong from '@zibuthe7j11/accusantium-exercitationem-incidunt';

mongooseLong(mongoose);

const Long = mongoose.Schema.Types.Long;

Readme

Keywords

Package Sidebar

Install

npm i @zibuthe7j11/accusantium-exercitationem-incidunt

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

15.2 kB

Total Files

10

Last publish

Collaborators

  • vnhat562