唯一生成UUID服务

uuid

import { UuidModule } from 'meepo-uuid'; @NgModule({ imports: [ UuidModule.forRoot() ] }) export class AppModule { }

import { UuidService } from 'meepo-uuid'; export class AppComponent implements OnInit { namespace: string = this.uuid.v1(); constructor( public uuid: UuidService ) {} ngOnInit(){ console.log(this.uuid.v1()); console.log(this.uuid.v4()); console.log(this.uuid.v5DNS('meepo.com.cn')); console.log(this.uuid.v5URL('http://example.com/hello')); console.log(this.uuid.v5('http://example.com/hello')); console.log(this.uuid.v5Name('http://example.com/hello',this.namespace)); } }

版权声明:

1、该文章(资料)来源于互联网公开信息,我方只是对该内容做点评,所分享的下载地址为原作者公开地址。
2、网站不提供资料下载,如需下载请到原作者页面进行下载。