1.0.24 • Published 6 years ago
trivefunc v1.0.24
The Trive Javascript Library
A collection of useful library functions, because I got tired of writing the same client-side logic across hybrid mobile and web, and multiple versions of both. The repository can be found here, and the documentation website can be found here.
Install Project Dependencies
$ npm i
Running the Test Suite
Because who doesn't love writing tests?
$ ./node_modules/mocha/bin/mocha
# or simply...
$ npm test
Compile All the Things!
$ chmod +x compile.sh
$ ./compile.sh
# or simply...
$ npm run-script compile
Create the Documentation!
$ jsdoc --readme /Users/jo/Desktop/libraries/trivefunc/README.md /Users/jo/Desktop/libraries/trivefunc/index.js
Compress All the Things!
$ npm run-script compress
Publish to NPM!
# You must be a maintainer
$ npm publish
Documentation
- assembleDateString
- brandKeyToName
- brandRows
- defaultDeviceStatus
- ensureNumber
- filterServicesBidFailure
- filterServicesBidSuccess
- filterServicesMessageBuy
- filterServicesMessageSell
- filterServicesMessageService
- handleMiscPipe
- isValidCarNumber
- mapCsType
- mapServiceType
- reformatDateString
- transformNumber
- transformPrice
- transmissionKeyToName
assembleDateString
// Arguments: year: number | string, month: number | string, day: number | string
// Return Value: string
assembleDateString(1990, 7, 7)
// '19900707'
assembleDateString('1990', '7', '7')
// '19900707'
brandKeyToName
// Arguments: brandKey: string
// Return Value: string
brandKeyToName('kia')
// '기아'
brandRows
// DOCUMENTATION IN PROGRESS
defaultDeviceStatus
// DOCUMENTATION IN PROGRESS
ensureNumber
// DOCUMENTATION IN PROGRESS
filterServicesBidFailure
// DOCUMENTATION IN PROGRESS
filterServicesBidSuccess
// DOCUMENTATION IN PROGRESS
filterServicesMessageBuy
// DOCUMENTATION IN PROGRESS
filterServicesMessageSell
// DOCUMENTATION IN PROGRESS
filterServicesMessageService
// DOCUMENTATION IN PROGRESS
handleMiscPipe
// DOCUMENTATION IN PROGRESS
isValidCarNumber
// Arguments: carNumber: string
// Return Value: boolean
isValidCarNumber('11헐1111')
// true
isValidCarNumber('1191111')
// false
mapCsType
// DOCUMENTATION IN PROGRESS
mapServiceType
// DOCUMENTATION IN PROGRESS
reformatDateString
// DOCUMENTATION IN PROGRESS
transformNumber
// Arguments: original: number | string
// Return Value: string
transformNumber('9999999')
// '9,999,999'
transformNumber(1000)
// '1,000'
transformPrice
// Arguments: price: number
// Return Value: string
transformPrice(0)
// '0원'
transformPrice(990)
// '990원'
transformPrice(1120)
// '1,120원'
transformPrice(19120)
// '1만 9,120원'
transformPrice(129120)
// '12만 9,120원'
transformPrice(99129120)
// '9,912만 9,120원'
transformPrice(600000000)
// '6억원'
transformPrice(600010000)
// '6억 1만원'
transformPrice(699129120)
// '6억 9,912만 9,120원'
transformPrice(55699129120)
// '556억 9,912만 9,120원'
transmissionKeyToName
// Arguments: transmissionKey: string
// Return Value: string
transmissionKeyToName('automatic_')
// '자동'
1.0.24
6 years ago
1.0.23
6 years ago
1.0.22
6 years ago
1.0.21
6 years ago
1.0.20
6 years ago
1.0.19
6 years ago
1.0.18
6 years ago
1.0.17
6 years ago
1.0.16
6 years ago
1.0.15
6 years ago
1.0.14
6 years ago
1.0.13
6 years ago
1.0.12
6 years ago
1.0.10
6 years ago
1.0.9
6 years ago
1.0.8
6 years ago
1.0.7
6 years ago
1.0.6
6 years ago
1.0.5
6 years ago
1.0.4
6 years ago
1.0.3
6 years ago
1.0.2
6 years ago
1.0.1
6 years ago
1.0.0
6 years ago
0.0.4
6 years ago
0.0.3
6 years ago
0.0.2
6 years ago
0.0.1
6 years ago