Best of NPM2024

  1. 1
    Article
    Avatar of devtoDEV·2y

    NodeJS Security Best Practices

    Learn how to improve the security of your NodeJS application by using packages like helmet for preventing attacks, toobusy-js for preventing DOS attacks, and express-rate-limit for rate limiting.

  2. 2
    Article
    Avatar of communityCommunity Picks·2y

    React Email 2.0 · Resend

    React Email has released version 2.0 with new features including a mobile preview, revamped file tree, better user feedback, and improved error handling. The new version also has faster setup and start-up times. Code highlighting components have been added for displaying code in emails. The release is compatible with various package managers and can be deployed easily to Vercel.

  3. 3
    Article
    Avatar of communityCommunity Picks·2y

    Securing Node.js in Production: Expert Practices for Every Developer

    This post provides expert practices for securing Node.js applications in production, including operating without root privileges, keeping NPM libraries up-to-date, customizing cookie names, implementing secure HTTP headers with Helmet, rate limiting, enforcing strong authentication policies, minimizing error details, vigilant monitoring, embracing HTTPS-only policy, validating user input, and leveraging security linters.

  4. 4
    Article
    Avatar of communityCommunity Picks·2y

    jagenjo/litegraph.js: A graph node engine and editor written in Javascript similar to PD or UDK Blueprints, comes with its own editor in HTML5 Canvas2D. The engine can run client side or server side u

    LiteGraph.js is a Javascript library for creating graph nodes similar to Unreal Blueprints that can run in the browser or on the server. It includes an editor with features like zooming, panning, customizable themes, and live mode. Nodes for various interfaces, math operations, audio, and 3D graphics are pre-built. The library supports TypeScript and integrates easily into any JS application. Instructions for installation via npm or direct download are provided.

  5. 5
    Article
    Avatar of communityCommunity Picks·2y

    PGlite - run Postgres everywhere

    PGlite is a WASM-based Postgres database that works in various JavaScript runtimes, including NodeJS, BUN, Deno, and browsers. It's lightweight, supports popular Postgres extensions, and is ideal for local-first applications, prototypes, local caches, and CI pipelines. The database can be easily installed via npm and used with regular SQL queries.

  6. 6
    Article
    Avatar of communityCommunity Picks·2y

    Mastering npm: A Comprehensive Guide to Package Management

    npm (Node Package Manager) is a vital tool in the JavaScript ecosystem for managing dependencies, running scripts, and ensuring version control. Despite npm not being the sole package manager (with alternatives like Yarn, pnpm, and Bun), it is widely used and offers a vast ecosystem. Key files like `package.json` and lock files ensure dependency consistency. Tools such as `npm-check-updates` and `npm-check` help maintain and update dependencies smoothly. Choosing the right package manager and using these tools judiciously can help developers navigate the complexities of package management.

  7. 7
    Article
    Avatar of devtoDEV·2y

    A Guide to Building CLI Tools in JavaScript

    This guide provides step-by-step instructions on building CLI tools in JavaScript, including setting up the development environment, crafting the CLI application, testing and linking the tool locally, enhancing functionality, and sharing the tool on npm.

  8. 8
    Article
    Avatar of communityCommunity Picks·2y

    nextjs-toploader

    A Next.js Top Loading Bar component called `nextjs-toploader` utilizes nprogress and works with Next.js 14 and React. It can be installed via npm or yarn and integrated into different components. The default configuration includes parameters like color, speed, height, and more, which can be customized as needed.

  9. 9
    Article
    Avatar of communityCommunity Picks·2y

    Publish Your Own NPM Package Easily

    Learn how to publish your own NPM package easily. Create an NPM account, choose a unique package name, initialize git repository and NPM in your project, write your code, create an executable script, test your NPM package, and finally, publish it on the NPM registry. Now you can access your tool anywhere in the world!

  10. 10
    Article
    Avatar of communityCommunity Picks·2y

    szimek/signature_pad: HTML5 canvas based smooth signature drawing

    Signature Pad is a JavaScript library for drawing smooth signatures using HTML5 canvas and Bézier curve interpolation. It supports all modern browsers and offers features like erase and undo, along with various customization options for elements such as pen color, min/max width, and background color. Installation can be done via npm, Yarn, or directly with a script tag. The library also handles high DPI screens and provides various methods for converting and manipulating the signature data in different formats.

  11. 11
    Article
    Avatar of lnLaravel News·2y

    Basset is an alternative way to load CSS & JS assets

    Basset is a better asset helper for Laravel that allows you to load CSS and JS assets directly from the URL. It removes the limitations of the traditional asset() function and provides features such as downloading assets from CDNs, loading vendor and non-public assets, preventing double-loading of assets, and improving performance by using HTTP/2.

  12. 12
    Article
    Avatar of dockerDocker·2y

    How to Create Dockerfiles with GenAI

    The post explores the use of generative AI (GenAI) for generating Dockerfiles, highlighting how AI tools like ChatGPT can analyze projects and create Dockerfiles with improved best practices. By providing specific functions and prompts, the AI can automate Dockerfile creation, employing advanced techniques like multi-stage builds and cache mounts, aimed at enhancing efficiency and adaptability. The content emphasizes practical examples and ongoing evaluation of AI's role in developer workflows.

  13. 13
    Article
    Avatar of communityCommunity Picks·2y

    catppuccin/daisyui: 🌼 Soothing pastel theme for daisyUI

    Catppuccin provides a soothing pastel theme for daisyUI, compatible with npm, pnpm, and yarn package managers. It lets developers choose or customize themes such as Latte, Frappe, Macchiato, and Mocha. Accent colors can be assigned to primary, secondary, and other semantic color values. Recommended testing with provided HTML grid to ensure theme styling.

  14. 14
    Video
    Avatar of kevinpowellKevin Powell·2y

    npm for absolute beginners

    Learn how to get started with npm, including installing Node.js, using the command line, initializing new projects, and understanding package.json files for managing dependencies and scripts. The guide covers basic navigation within the command line and provides an example of creating a project with Vite, adding dependencies, and using package managers efficiently.

  15. 15
    Article
    Avatar of hnHacker News·2y

    Standalone

    Create interaction, motion, and 3D content with a new open-source, offline standalone version of cables, available for free download. The software offers a customizable node-based interface, real-time adjustments, and the ability to integrate with local development setups using npm packages. The MIT license ensures freedom and transparency, allowing users to inspect and modify the code. Contributions and community support are encouraged.

  16. 16
    Article
    Avatar of communityCommunity Picks·2y

    metafloor/bwip-js: Barcode Writer in Pure JavaScript

    bwip-js is a JavaScript library that translates code from Barcode Writer in Pure PostScript to generate barcodes in modern browsers or JavaScript-based server frameworks. It supports over 100 barcode types and can render images as PNG, SVG, or to a canvas. The library version 4.5.0 introduces four platform-specific packages to address build chain issues. Users can install bwip-js via npm and use various rendering interfaces across platforms. It includes extensive options for customization and supports both synchronous and asynchronous operations with Promises.

  17. 17
    Article
    Avatar of communityCommunity Picks·2y

    Why FontAwesome is still awesome

    FontAwesome remains a powerful tool for web developers, provided it's implemented correctly. Common misconceptions about its complexity, such as difficulty in managing versions, importing unused icons, resizing issues, and breaking changes in major updates, often stem from improper use. By optimizing implementation through npm packages or Kits, and following best practices, developers can avoid pitfalls and optimize performance. FontAwesome offers robust backward compatibility and straightforward access to updates, making it a reliable choice for scalable icons.

  18. 18
    Article
    Avatar of freecodecampfreeCodeCamp·2y

    How to Enhance Embedded Links in React with Microlink

    Learn how to enhance embedded links in React with Microlink. Explore the concept of micro-linking, how it works, and the introduction of the Microlink package. Set up your project, create a demo project, and tweak the size of embedded links. Improve the aesthetic feel of your site with CSS styling.

  19. 19
    Article
    Avatar of tsTypescript·2y

    Announcing TypeScript 5.7 RC

    TypeScript 5.7 RC is now available, introducing checks for never-initialized variables, path rewriting for relative paths, support for target and lib es2024, and improved project ownership checks in editors. New compiler options and validation rules aim to enhance development efficiency and compatibility with tools like Node.js and ts-node. Additionally, V8 compile caching in Node.js promises significant speed improvements.

  20. 20
    Article
    Avatar of auth0Auth0·2y

    Secure Node.js Applications from Supply Chain Attacks

    The post offers comprehensive strategies to secure Node.js applications against supply chain attacks. It emphasizes the significance of blocking installation scripts, dynamic scripts, and child processes while ensuring dependencies are constantly updated and audited. The article advocates for using lockfiles, enforcing unprivileged modes, and running applications in read-only filesystems. Additionally, network traffic filtering, distroless Docker images, and protecting developer environments are recommended practices to enhance security.

  21. 21
    Article
    Avatar of freecodecampfreeCodeCamp·2y

    When to Use NPM Packages – A Guide for Developers

    Npm (Node Package Manager) is a valuable tool for developers, offering a wide range of ready-made code modules to streamline development. However, it's essential to use npm packages judiciously. While they boost efficiency, provide numerous options, foster community collaboration, and promote modularity, they also have pitfalls such as dependency overload, security risks, and maintenance challenges. Striking a balance involves evaluating the project's needs, package size, and compatibility. Ultimately, developers should consider building custom solutions for basic utilities and performance optimization to enhance learning and maintain project integrity.

  22. 22
    Video
    Avatar of denoDeno·2y

    Deno Just Got Faster

  23. 23
    Article
    Avatar of freecodecampfreeCodeCamp·2y

    Collect.js Tutorial – How to Work with JavaScript Arrays and Objects

    Learn how to work with JavaScript arrays and objects using Collect.js, a convenient and dependency-free wrapper. Install Collect.js using npm and start simplifying your JavaScript development. Explore useful methods like 'average', 'chunk', 'contains', 'diff', 'get', 'groupBy', 'isEmpty', 'isNotEmpty', 'first', 'last', and 'macro'. References to official documentation available.

  24. 24
    Article
    Avatar of devtoDEV·2y

    A step-by-step guide: How to create and publish an NPM package.

    Learn how to create and publish an NPM package, the importance of NPM in Node.js development, and how the NPM registry works.

  25. 25
    Article
    Avatar of communityCommunity Picks·2y

    npm-check-updates

    npm-check-updates is a tool for updating your package.json dependencies to the latest versions while maintaining existing semantic versioning policies. It only modifies the package.json file, and you must run npm install to update your installed packages and package-lock.json. The tool supports npm, yarn, pnpm, deno, and bun, and can be used via CLI or as a module. It offers a variety of options for filtering packages, running interactive updates, and configuring advanced features.