Node Class UUID Mixin
Attach a UUID to a class as class_uid
and add generateUuid()
helper functions
npm install deployable-mixin-class_uid --save
yarn add deployable-mixin-class_uid
const mix = require('mixwith').mix
const MixinClassUid = require('deployable-mixin-class_uid')
class SomeMix = {}
class Some extends mix(SomeMix).with(MixinClassUid) {}
let obj = new Some()
console.log(obj.class_uid)
console.log(obj.generateUuid())
Static method to generate a uuid. Pass a version v1
or v4
Get or set the uid on the class via a property
Instance method to generate a uuid. Pass a version v1
or v4
deployable-mixin-class_uid is released under the MIT license.
Copyright 2016 Matt Hoyle