@paycar-cli/wire-transfer-timeline-simulator
v2.0.0
Published
## setUp node >= 12.1.0
Downloads
5
Readme
Wire transfer timeline simulator
setUp
node >= 12.1.0
/!\ lib use es6 import /!\
install
npm i
run example
npm run example
or node --experimental-modules --experimental-json-modules example/node-esm-example.js
build to browser
npm run build
browser
<script src="dist/bundle.js"><script>
example with a transfert eta in express mode
import { transferEta } from '@paycar-cli/wire-transfer-timeline-simulator/src/index.js'
const result = transferEta('15/04/2019 8:00:00', true, 'fr')
result :
{
isExpress: true,
transferCreationDateString: '15/04/2019 8:00:00',
transferCreatedAt: 2019-04-15T08:00:00.001Z,
transferExecutedAt: {
date: 2019-04-15T08:00:00.001Z
},
transferEarliestEta: {
date: 2019-04-15T20:00:00.001Z
}
}
example with a transfert eta
import { transferEta } from '@paycar-cli/wire-transfer-timeline-simulator/src/index.js'
const result = transferEta('18/04/2019 8:00:00', false, 'fr')
result :
{
isExpress: false,
transferCreationDateString: '18/04/2019 8:00:00',
transferCreatedAt: 2019-04-18T08:00:00.001Z,
transferExecutedAt: {
date: 2019-04-18T08:00:00.001Z,
daysOff: { weekend: [], holidays: [] }
},
transferEarliestEta: {
date: 2019-04-23T08:00:00.001Z,
daysOff: {
weekend: [
2019-04-20T08:00:00.001Z,
2019-04-21T08:00:00.001Z
],
holidays: [
2019-04-19T08:00:00.001Z,
2019-04-22T08:00:00.001Z
]
}
},
transferLatestEta: {
date: 2019-04-24T08:00:00.001Z,
daysOff: {
weekend: [
2019-04-20T08:00:00.001Z,
2019-04-21T08:00:00.001Z
],
holidays: [
2019-04-19T08:00:00.001Z,
2019-04-22T08:00:00.001Z
]
}
}
}