trivefunc

1.0.24 • Public • Published

The Trive Javascript Library

Build Status

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

// 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_')
// '자동'

Readme

Keywords

none

Package Sidebar

Install

npm i trivefunc

Weekly Downloads

1

Version

1.0.24

License

ISC

Unpacked Size

1.43 MB

Total Files

118

Last publish

Collaborators

  • jochoi0707