crossplat_objectid
3.0.0, released 5 years ago by an unverified publisher
Cross-platform BSON ObjectId implementation in Dart
WASM-ready
What it does
Provides a BSON ObjectId implementation in Dart that allows you to create and parse ObjectIds. It works across platforms without requiring a reference to the mongodb or bson packages.
AI-written summary of version 3.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to generate or parse MongoDB-style ObjectIds in Dart
- You want ObjectId support without depending on heavy database packages like mongodb or bson
Skip it when
- You are already using the full mongodb or bson packages which include their own ObjectId implementation
Strengths
- Independent of mongodb and bson packages
- Cross-platform support
Weaknesses
- Very narrow scope focused solely on BSON ObjectIds
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
import 'package:bson_objectid/bson_objectid.dart';
main() {
ObjectId id1 = new ObjectId();
print(id1.toHexString());
ObjectId id2 = new ObjectId.fromHexString('54495ad94c934721ede76d90');
print(id2.timestamp);
print(id2.machineId);
print(id2.processId);
print(id2.counter);
}Alternatives
Packages that do the same job and could replace crossplat_objectid.
- objectid
Blazing fast, cross-platform ObjectId implementation for Dart and Flutter.
64Compare - webcrypto
Cross-platform implementation of Web Cryptography APIs for Dart.
89Compare - worker_bee
Cross-platform isolated worker runtime for Dart Web, VM, and Flutter
82Compare - scidart
Cross-platform scientific library for Dart inspired by NumPy and SciPy.
78Compare