day-serial
v1.1.2
Published
day serial.
Downloads
2
Readme
day-serial
Generate daily id
example
const serial = require('day-serial')
let a = serial()
console.log(a) // A000020180511
first update
- Supports head parameters
example
- no parameters
const serial = require('day-serial')
let a = serial()
console.log(a) // A000020180511
- parameters
const serial = require('day-serial')
let head = 'ABC000'
let b = serial(head)
console.log(b) // ABC00020180511
let a = serial('ABC000')
console.log(a) // ABC00020180511
- ES6
import serial from 'day-serial'
let a = serial()
console.log(a) // A000020180511
let b = serial('ABC000')
console.log(b) // ABC00020180511
let head = 'ABC000'
let c = serial(head)
console.log(c) // ABC00020180511