npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@kavist/arjuna

v1.1.2-ps.1

Published

Node.js Boilerplate, revisited

Downloads

19

Readme

⚠ Caution: This is just a hack ⚠

I am not the original maintainer of Arjuna. This package is merely a hack to satisfy NPM Audit results, since the original package is not updated for a long time. Do not expect any bug fixes or new features out of this package.

Arjuna 😐

Death simple Node.js 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

| Status | Facade | Method | Description | | --- | ------ | ------ | ------ | | Datastore Package | | ✔️ | Redis | get | supported: redis | | ✔️ | | set | | | ✔️ | | del | | | ✔️ | | expire | | | ✔️ | | increment | | | ✔️ | | decrement | | | ✔️ | | resetCounter | | | ✔️ | | flushCurrentDb | | | ✔️ | Config | set | Set object data by a unique key into file | | ✔️ | | get | get object data by a unique key from a file | | ✔️ | | all | get all object data from file | | Log Package | | ✔️ | Log | report | | | ✔️ | | consoleReport | | | ✔️ | | localReport | | | ✔️ | | onlineReport | | | ❓ | | setConfig | | | Manipulator Package | | ✔️ | Date | getFullDate | get date (Format: YYYY-MM-DD HH:mm:ss, Default: Current Date) | | ✔️ | | getOnlyDate | get date (Format: YYYY-MM-DD, Default: Current Date) | | ✔️ | | moment | return moment instance | | ✔️ | | wait | | | ✔️ | Html | encode | encode html tag into html entity | | ✔️ | | decode | decode html entity into html tag | | ✔️ | | toText | convert html tag into plain text | | ✔️ | Number | random | | | ✔️ | | currency | | | ✔️ | Text | random | | | ✔️ | | isValidYoutubeUrl | | | ✔️ | | getYoutubeVideoId | | | ✔️ | | slugify | | | ✔️ | | uuid | | | ✔️ | | isValidUuid | | | ✔️ | | getUuidVersion | | | ✔️ | | mask | | | ✔️ | Security | createRandomKey | | | ✔️ | | createRandomSecret | | | ✔️ | | encrypt | | | ✔️ | | decrypt | | | ✔️ | Object | renameKey | | | Network Package | | ✔️ | Event | publish | supported: rabbitmq | | ✔️ | | subscribe | | | ✔️ | | enqueue | | | ✔️ | | dequeue | | | ✔️ | Request | get | perform http get request | | ✔️ | | post | perform http post request | | ✔️ | | put | perform http put request | | ✔️ | | patch | perform http patch request | | ✔️ | | delete | perform http delete request | | ✔️ | | multiple | perform multiple http request | | ✔️ | Response | setCode | | | ✔️ | | setStatus | | | ✔️ | | setMessage | | | ✔️ | | setData | | | ✔️ | | setError | | | ✔️ | | toObject | | | ✔️ | | toJson | | | ✔️ | | success | | | ✔️ | | error | | | ✔️ | | invalid | | | ✔️ | | forbidden | | | ✔️ | | notFound | | | ✔️ | | unauthenticate | | | ✔️ | | badGateway | | | ✔️ | | requestTimeout | | | Pattern Package | | ✔️ | Command | execute | | | ✔️ | Query | get | | | ✔️ | Factory | create | | | ✔️ | Operation | run | | | ✔️ | Provider | register | | | ✔️ | Repository | all | | | ✔️ | | get | | | ✔️ | | create | | | ✔️ | | first | | | ✔️ | | update | | | ✔️ | | delete | | | ✔️ | | insert | | | ✔️ | | findByIdentifier | | | ✔️ | | generateQueryFromParams | | | ✔️ | | getTransactionFromParams | | | ✔️ | | registerStaticFunctions | | | ✔️ | | registerStaticFunction | | | ✔️ | | getMethodNames | | | ❓ | | last | | | Serialization Package | | ✔️ | Protobuf | encode | | | ✔️ | | decode | | | ✔️ | | verify | | | ✔️ | | createSchema | | | ✔️ | Base64 | encode | | | ✔️ | | decode | | | Structure Package | | ✔️ | Entity | setParams | set entity property from an object | | ✔️ | SqlModel | instance | | | ✔️ | | registerDefaultStaticFunctions | | | ✔️ | | registerStaticFunctions | | | ✔️ | | createSqlModel | | | ✔️ | | getOption | | | ✔️ | ViewModel | setParams | | | ✔️ | | toObject | | | ✔️ | | toJson | | | Unavailable packages - coming soon, maybe? | | ❌ | Controller | constructor | supported: express req/res | | ❌ | Middleware | validation | supported: express req/res | | ❌ | | logger | | | ❌ | | monitoring | supported: prometheus | | ❌ | Builder | build | | | ❌ | | 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

Feel free to contribute

💖 Support

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

📜 License

MIT