Trending Projects is available as a weekly newsletter please sign up at www.iainfreestone.com to ensure you never miss an issue.
1. React Query
Hooks for fetching, caching and updating asynchronous data in React
tannerlinsley / react-query
⚛️ Hooks for fetching, caching and updating asynchronous data in React
Hooks for fetching, caching and updating asynchronous data in React
Enjoy this library? Try the entire TanStack! React Table, React Form, React Charts
Visit react-query.tanstack.com for docs, guides, API and more!
Still on React Query v2? No problem! Check out the v2 docs here: https://react-query-v2.tanstack.com/.
Quick Features
- Transport/protocol/backend agnostic data fetching (REST, GraphQL, promises, whatever!)
- Auto Caching + Refetching (stale-while-revalidate, Window Refocus, Polling/Realtime)
- Parallel + Dependent Queries
- Mutations + Reactive Query Refetching
- Multi-layer Cache + Automatic Garbage Collection
- Paginated + Cursor-based Queries
- Load-More + Infinite Scroll Queries w/ Scroll Recovery
- Request Cancellation
- React Suspense + Fetch-As-You-Render Query Prefetching
- Dedicated Devtools
- (depending on features imported)
Become a Sponsor!
Contributors ✨
Thanks goes to these wonderful people (emoji key):
…2. Discord.js
discord.js is a powerful Node.js module that allows you to easily interact with the Discord API.
discordjs / discord.js
A powerful JavaScript library for interacting with the Discord API
About
discord.js is a powerful Node.js module that allows you to easily interact with the Discord API.
- Object-oriented
- Predictable abstractions
- Performant
- 100% coverage of the Discord API
Installation
Node.js 16.6.0 or newer is required.
npm install discord.js
yarn add discord.js
pnpm add discord.js
Optional packages
-
zlib-sync for WebSocket data compression and inflation (
npm install zlib-sync
) -
erlpack for significantly faster WebSocket data (de)serialisation (
npm install discord/erlpack
) -
bufferutil for a much faster WebSocket connection (
npm install bufferutil
) -
utf-8-validate in combination with
bufferutil
for much faster WebSocket processing (npm install utf-8-validate
) - @discordjs/voice for interacting with the Discord Voice API
Example usage
Install all required dependencies:
npm install discord.js @discordjs/rest discord-api-types
yarn add discord.js @discordjs/rest discord-api-types
pnpm add discord.js @discordjs/rest discord-api-types
Register a slash command against the Discord API:
const { REST } = require('@discordjs/rest');
const { Routes } = require
…3. NextAuth.js
NextAuth.js is a complete open source authentication solution for Next.js applications.
nextauthjs / next-auth
Authentication for Next.js
NextAuth.js
Authentication for Next.js
Open Source. Full Stack. Own Your Data
Overview
NextAuth.js is a complete open source authentication solution for Next.js applications.
It is designed from the ground up to support Next.js and Serverless.
Getting Started
npm install --save next-auth
The easiest way to continue getting started, is to follow the getting started section in our docs.
We also have a section of tutorials for those looking for more specific examples.
See next-auth.js.org for more information and documentation.
Features
Flexible and easy to use
- Designed to work with any OAuth service, it supports OAuth 1.0, 1.0A and 2.0
- Built-in support for many popular sign-in services
- Supports email / passwordless authentication
- Supports stateless authentication with any backend (Active Directory, LDAP, etc)
- Supports both JSON Web Tokens and database sessions
- Designed for Serverless but runs anywhere (AWS Lambda, Docker, Heroku, etc…)
Own your own data
NextAuth.js can be used with or…
4. Cropper.js
JavaScript image cropper.
fengyuanchen / cropperjs
JavaScript image cropper.
Cropper.js
JavaScript image cropper.
- Website
- Photo Editor - An advanced example of Cropper.js.
- jquery-cropper - A jQuery plugin wrapper for Cropper.js.
Table of contents
- Features
- Main
- Getting started
- Options
- Methods
- Events
- No conflict
- Browser support
- Contributing
- Versioning
- License
Features
- Supports 39 options
- Supports 27 methods
- Supports 6 events
- Supports touch (mobile)
- Supports zooming
- Supports rotating
- Supports scaling (flipping)
- Supports multiple croppers
- Supports to crop on a canvas
- Supports to crop an image in the browser-side by canvas
- Supports to translate Exif Orientation information
- Cross-browser support
Main
dist/
├── cropper.css
├── cropper.min.css (compressed)
├── cropper.js (UMD)
├── cropper.min.js (UMD, compressed)
├── cropper.common.js (CommonJS, default)
└── cropper.esm.js (ES Module)
Getting started
Installation
npm install cropperjs
In browser:
<link href="/path/to/cropper.css" rel="stylesheet">
<script src="/path/to/cropper.js"></script>
cdnjs provides CDN support for Cropper.js's CSS and JavaScript. You can find the links…
5. Clean Code JavaScript
Software engineering principles, from Robert C. Martin's book Clean Code, adapted for JavaScript.
ryanmcdermott / clean-code-javascript
🛁 Clean Code concepts adapted for JavaScript
clean-code-javascript
Table of Contents
- Introduction
- Variables
- Functions
- Objects and Data Structures
- Classes
- SOLID
- Testing
- Concurrency
- Error Handling
- Formatting
- Comments
- Translation
Introduction
Software engineering principles, from Robert C. Martin's book Clean Code adapted for JavaScript. This is not a style guide. It's a guide to producing readable, reusable, and refactorable software in JavaScript.
Not every principle herein has to be strictly followed, and even fewer will be universally agreed upon. These are guidelines and nothing more, but they are ones codified over many years of collective experience by the authors of Clean Code.
Our craft of software engineering is just a bit over 50 years old, and we are still learning a lot. When software architecture is as old as architecture itself, maybe then we will have harder rules to follow. For now, let these guidelines serve as a touchstone by which to assess the quality of the JavaScript…
6. Winston
A logger for just about everything.
winston
A logger for just about everything.
winston@3
See the Upgrade Guide for more information. Bug reports and PRs welcome!
Looking for winston@2.x
documentation?
Please note that the documentation below is for winston@3
Read the winston@2.x
documentation.
Motivation
winston
is designed to be a simple and universal logging library with
support for multiple transports. A transport is essentially a storage device
for your logs. Each winston
logger can have multiple transports (see
Transports) configured at different levels (see: Logging levels). For
example, one may want error logs to be stored in a persistent remote location
(like a database), but all logs output to the console or a local file.
winston
aims to decouple parts of the logging process to make it more
flexible and extensible. Attention is given to supporting flexibility in log
formatting (see: Formats) & levels (see: Using custom logging levels), and…
7. Awesome-Selfhosted
List of Free Software network services and web applications which can be hosted locally. Non-Free software is listed on the Non-Free page.
awesome-selfhosted / awesome-selfhosted
A list of Free Software network services and web applications which can be hosted on your own servers
Awesome-Selfhosted
Self-hosting is the practice of locally hosting and managing applications instead of renting from SaaSS providers.
This is a list of Free Software network services and web applications which can be hosted locally. Non-Free software is listed on the Non-Free page.
See Contributing.
Table of contents
Click on the menu icon next to README.md for a list of sections
Software
Analytics
Please visit Awesome Analytics
Related: Personal Dashboards
Archiving and Digital Preservation (DP)
Some Content Management System solutions also feature archiving and digital preservation.
-
Access to Memory (AtoM) - Web-based, open source application for standards-based archival description and access in a multilingual, multi-repository environment. (Demo, Source Code)
AGPL-3.0-only
PHP
- ArchiveBox - Self-hosted wayback machine that creates HTML & screenshot archives of sites from your bookmarks, browsing history, RSS feeds, or other sources. (Source Code…
8. WebdriverIO
WebdriverIO is a test automation framework that allows you to run tests based on the Webdriver protocol and Appium automation technology.
webdriverio / webdriverio
Next-gen browser and mobile automation test framework for Node.js
Next-gen browser and mobile automation test framework for Node.js
Homepage | Developer Guide | API Reference | Contribute | Changelog | Roadmap
WebdriverIO is a test automation framework that allows you to run tests based on the Webdriver protocol and Appium automation technology. It provides support for your favorite BDD/TDD test framework and will run your tests locally or in the cloud using Sauce Labs, BrowserStack, TestingBot or LambdaTest.
👩💻 👨💻 Contributing
You like WebdriverIO and want to help making it better? Awesome! Have a look into our Contributor Documentation to get started with setting up the repo.
If you're looking for issues to help out with, check out the issues labelled "good first pick". You can also reach out in our Gitter Channel if you have question on where to start contributing.
🏢 WebdriverIO for Enterprise
Available as part of the Tidelift Subscription.
The maintainers of WebdriverIO and…
9. react-use
Collection of essential React Hooks
👍
react-use
Collection of essential React Hooks Port of
libreact
Translations:
npm i react-use
-
Sensors
-
useBattery
— tracks device battery state. -
useGeolocation
— tracks geo location state of user's device. -
useHover
anduseHoverDirty
— tracks mouse hover state of some element. -
useHash
— tracks location hash value. -
useIdle
— tracks whether user is being inactive. -
useIntersection
— tracks an HTML element's intersection. -
useKey
,useKeyPress
,useKeyboardJs
, anduseKeyPressEvent
— track keys. -
useLocation
anduseSearchParam
— tracks page navigation bar location state. -
useLongPress
— tracks long press gesture of some element. -
useMedia
— tracks state of a CSS media query. -
useMediaDevices
— tracks state of connected hardware devices. -
useMotion
— tracks state of device's motion sensor. -
useMouse
anduseMouseHovered
— tracks state of mouse position. -
useMouseWheel
— tracks deltaY of scrolled mouse wheel. -
useNetworkState
— tracks the…
-
10. Mock Service Worker (MSW)
Mock Service Worker (MSW) is an API mocking library for browser and Node.
Mock Service Worker
Mock Service Worker (MSW) is an API mocking library for browser and Node.js.
Features
- Seamless. A dedicated layer of requests interception at your disposal. Keep your application's code and tests unaware of whether something is mocked or not.
- Deviation-free. Request the same production resources and test the actual behavior of your app. Augment an existing API, or design it as you go, when there is none.
- Familiar & Powerful. Use Express-like routing syntax to capture outgoing requests. Use parameters, wildcards, and regular expressions to match requests, and respond with necessary status codes, headers, cookies, delays, or completely custom resolvers.
"I found MSW and was thrilled that not only could I still see the mocked responses in my DevTools, but that the mocks didn't have to be written in a Service Worker and could instead live alongside the rest of my app. This…
Trending Projects is available as a weekly newsletter please sign up at www.iainfreestone.com to ensure you never miss an issue.
If you enjoyed this article you can follow me on Twitter where I regularly post bite size tips relating to HTML, CSS and JavaScript.
Top comments (1)
Started reading through Clean Code JavaScript. Really awesome and bringing back memories of reading the book!