1.0.17 ā€¢ Published 3 years ago

arjuna v1.0.17

Weekly downloads
77
License
MIT
Repository
github
Last release
3 years ago

Arjuna šŸ˜Ž

Death simple nodejs boilerplate & utility wrapper

ā“ Motivations

  • Provide easy to use interfaces for nodejs application
  • Standarize coding style among teams and applications
  • Decrease repeatable things, write once run everywhere (DRY)
  • Increase software quality by using well tested utility library

šŸ–– Usage

Using npm

  npm install arjuna

In NodeJS

  /** file: app.js **/ 
  const { Text } = require('arjuna');
  const randomText2 = Text.random(30); //ifjaok89ewsmapxbgiodkap75nnmkvc

šŸ“‹ Docs

Complete documentations are available here

Legends:

  • āœ”ļø Available with test
  • āš ļø Available without test (Use with your own risk šŸ˜†)
  • āŒ Unavailable yet
  • ā“ Ideation/request

StatusFacadeMethodDescription
Datastore Package
āœ”ļøRedisgetsupported: redis
āœ”ļøset
āœ”ļødel
āœ”ļøexpire
āœ”ļøincrement
āœ”ļødecrement
āœ”ļøresetCounter
āœ”ļøflushCurrentDb
āœ”ļøConfigsetSet object data by a unique key into file
āœ”ļøgetget object data by a unique key from a file
āœ”ļøallget all object data from file
Log Package
āœ”ļøLogreportsupported: slack
āœ”ļøconsoleReport
āœ”ļølocalReport
āœ”ļøonlineReport
ā“setConfig
Manipulator Package
āœ”ļøDategetFullDateget date (Format: YYYY-MM-DD HH:mm:ss, Default: Current Date)
āœ”ļøgetOnlyDateget date (Format: YYYY-MM-DD, Default: Current Date)
āœ”ļømomentreturn moment instance
āœ”ļøwait
āœ”ļøHtmlencodeencode html tag into html entity
āœ”ļødecodedecode html entity into html tag
āœ”ļøtoTextconvert html tag into plain text
āœ”ļøNumberrandom
āœ”ļøcurrency
āœ”ļøTextrandom
āœ”ļøisValidYoutubeUrl
āœ”ļøgetYoutubeVideoId
āœ”ļøslugify
āœ”ļøuuid
āœ”ļøisValidUuid
āœ”ļøgetUuidVersion
āœ”ļømask
āœ”ļøSecuritycreateRandomKey
āœ”ļøcreateRandomSecret
āœ”ļøencrypt
āœ”ļødecrypt
āœ”ļøObjectrenameKey
Network Package
āœ”ļøEventpublishsupported: rabbitmq
āœ”ļøsubscribe
āœ”ļøenqueue
āœ”ļødequeue
āœ”ļøRequestgetperform http get request
āœ”ļøpostperform http post request
āœ”ļøputperform http put request
āœ”ļøpatchperform http patch request
āœ”ļødeleteperform http delete request
āœ”ļømultipleperform multiple http request
āœ”ļøResponsesetCode
āœ”ļøsetStatus
āœ”ļøsetMessage
āœ”ļøsetData
āœ”ļøsetError
āœ”ļøtoObject
āœ”ļøtoJson
āœ”ļøsuccess
āœ”ļøerror
āœ”ļøinvalid
āœ”ļøforbidden
āœ”ļønotFound
āœ”ļøunauthenticate
āœ”ļøbadGateway
āœ”ļørequestTimeout
Pattern Package
āœ”ļøCommandexecute
āœ”ļøQueryget
āœ”ļøFactorycreate
āœ”ļøOperationrun
āœ”ļøProviderregister
āœ”ļøRepositoryall
āœ”ļøget
āœ”ļøcreate
āœ”ļøfirst
āœ”ļøupdate
āœ”ļødelete
āœ”ļøinsert
āœ”ļøfindByIdentifier
āœ”ļøgenerateQueryFromParams
āœ”ļøgetTransactionFromParams
āœ”ļøregisterStaticFunctions
āœ”ļøregisterStaticFunction
āœ”ļøgetMethodNames
ā“last
Serialization Package
āœ”ļøProtobufencode
āœ”ļødecode
āœ”ļøverify
āœ”ļøcreateSchema
āœ”ļøBase64encode
āœ”ļødecode
Structure Package
āœ”ļøEntitysetParamsset entity property from an object
āœ”ļøSqlModelinstance
āœ”ļøregisterDefaultStaticFunctions
āœ”ļøregisterStaticFunctions
āœ”ļøcreateSqlModel
āœ”ļøgetOption
āœ”ļøViewModelsetParams
āœ”ļøtoObject
āœ”ļøtoJson
Unavailable packages - coming soon, maybe?
āŒControllerconstructorsupported: express req/res
āŒMiddlewarevalidationsupported: express req/res
āŒlogger
āŒmonitoringsupported: prometheus
āŒBuilderbuild
āŒtoObject
āŒtoJson

āœ”ļø Test & Coverages

Running test without coverage + watchers

  npm run test-minimal

Running test with coverage

  npm run test

Running unit test

  npm run test-unit

Running integration test (make sure you setup .env.test, check .env.example for more info)

  npm run test-integration

Test Coverages

Test coverages

šŸ˜‹ Dependencies

1. Utility: moment, numeral, uuid, nodemon, lodash, body-parser, dotenv, protobufjs, slugify, html-entities, html-to-text
2. ORM: sequelize, mysql2, mongoose
3. Networking: axios
4. Messaging: amqplib
5. Security: bcryptjs, jsonwebtoken
6. Logging: morgan, rotating-file-stream
7. Testing: mocha, nyc, chai, chai-like, chai-things, supertest

šŸ¤© Contributor

npm.io

Feel free to contribute

šŸ’– Support

This is open source project feel free to contributes and supporting us through: Idaman

šŸ“œ License

MIT