带区号生成器 为Node.Js生成带有前缀(la Stripe)的随机id 正在安装 npm i stripe-id-generator # or yarn add stripe-id-generator 使用 简单的情况: const IdGenerator = require ( 'stripe-id-generator' ) ; const generator = new IdGenerator ( ) ; const id = generator . new ( 'cus' ) ; console . log ( id ) ; // cus_lO1DEQWBbQAACfHO 预定义的一组允许的前缀(以避免错误): const IdGenerator = require ( 'stripe-id-generator' ) ; const generator = new IdGen