Identitfy and categorize Node.js dependencies (builtins, third parties..)

Overview

Dependa

Identify and categorize Node.js dependencies (builtins, alias, third parties..). The module and the code has been inspired by builtins and builtin-modules.

Features

  • Several ways to use the API (get and is) to allow any kind of custom code.
  • First class support of Node.js protocol node:.
  • Wider API not limited or restricted to Node.js core modules.

Getting Started

This package is available in the Node Package Repository and can be easily installed with npm or yarn.

$ npm i @nodesecure/dependa
# or
$ yarn add @nodesecure/dependa

Usage example

import * as dependa from "@nodesecure/dependa";

console.log(dependa.is.builtins("node:fs/promises"));
console.log(dependa.is.builtins("stream"));

const builtins = dependa.get.builtins();
console.log(builtins);

API

is.builtins(moduleName: string): boolean

Return true if the given moduleName is a Node.js core dependency.

is.subpath(moduleName: string): boolean

Return true if the given moduleName is a Subpath import (starting with #).

is.filesystem(moduleName: string): boolean

Return true if the given moduleName is a filesystem dependency (starting with /, ./ or ../).

is.thirdparty(moduleName: string): boolean

Return true if the given moduleName is a third-party dependency (which mean the module is not a subpath, builtins or filesystem).

get.builtins(options): Set< string >

Return an ES6 Set of all Node.js builtins (core dependency).

get.kind(moduleName: string): "subpath" | "filesystem" | "builtins" | "thirdparty"

Return the kind of the given module name.

Contributors

All Contributors

Thanks goes to these wonderful people (emoji key):

License

MIT

You might also like...

Another logger in JS. This one offers a console.log-like API and formatting, colored lines and timestamps (or not if desired), all that with 0 dependencies.

Another logger in JS. This one offers a console.log-like API and formatting, colored lines and timestamps (or not if desired), all that with 0 dependencies.

hellog Your new logger ! hellog is a general-purpose logging library. It offers a console.log-like API and formatting, extensible type-safety colored

Jan 5, 2022

@nodesecure/ci brings together a set of tools to identify dependencies vulnerabilities and track most common malicious code and patterns

@nodesecure/ci brings together a set of tools to identify dependencies vulnerabilities and track most common malicious code and patterns

NodeSecure CI Action @nodesecure/ci brings together a set of tools to identify dependencies vulnerabilities and track most common malicious code and p

Jul 29, 2022

Find and fix dangling files and unused dependencies in your JavaScript projects.

Find and fix dangling files and unused dependencies in your JavaScript projects.

unimported Find unused source files in javascript / typescript projects. While adding new code to our projects, we might forget to remove the old code

Jan 4, 2023

A super tiny Javascript library to make DOM elements draggable and movable. ~500 bytes and no dependencies.

dragmove.js A super tiny Javascript library to make DOM elements draggable and movable. Has touch screen support. Zero dependencies and 500 bytes Gzip

Dec 29, 2022

Show npm package authors and maintainers of your dependencies and devDependencies.

your-deps-authors Show npm package authors and maintainers of your dependencies and devDependencies. Usage $ npx your-deps-authors ╔══════════════════

Sep 29, 2022

Zero dependencies, lightweight, and asynchronous https requests package.

Zero dependencies, lightweight, and asynchronous https requests package.

This project is a Work in Progress and currently in development. The API is subject to change without warning. A small fetching package for super simp

Dec 8, 2022

🚀🚀 A Shopify embedded app starter template, with updated dependencies, session storage, app context and examples for basic functionalities.

Shopify Node App Starter This is a starter template for embedded shopify apps based on the shopify cli node app. Contributions to create the perfect s

Jan 8, 2023

Extract a JS/TS module and its dependencies into a new package

module-extractor Extract a module and its dependencies into a new package Usage import { extractModules } from 'module-extractor' const extraction =

Aug 9, 2022

Simple and lightweight form validation for Svelte with no dependencies.

Svelidate Simple and lightweight form validation for Svelte with no dependencies Installation // npm npm install svelidate // yarn yarn add svelidate

Dec 28, 2022
Comments
  • [Snyk] Upgrade semver from 7.3.7 to 7.3.8

    [Snyk] Upgrade semver from 7.3.7 to 7.3.8

    This PR was automatically created by Snyk using the credentials of a real user.


    Snyk has created this PR to upgrade semver from 7.3.7 to 7.3.8.

    merge advice :information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.


    • The recommended version is 1 version ahead of your current version.
    • The recommended version was released 21 days ago, on 2022-10-04.
    Release notes
    Package name: semver from semver GitHub release notes
    Commit messages
    Package name: semver
    • dc0fe20 chore: release 7.3.8 (#486)
    • 40f7dfc chore(ci): dont set workspaces flag for tests (#487)
    • d8ef32c fix: add support for node.js esm auto exports (#383)
    • 7209b14 docs: update range.js comments to clarify the caret ranges examples (#477)
    • 6010883 chore: postinstall for dependabot template-oss PR
    • 802a66d chore: bump @ npmcli/template-oss from 4.3.2 to 4.4.4
    • f97d600 chore: bump @ npmcli/template-oss from 3.6.0 to 4.3.2
    • bce4258 chore: postinstall for dependabot template-oss PR
    • 7d28971 chore: bump @ npmcli/template-oss from 3.5.0 to 3.6.0
    • e9a1f26 chore: bump @ npmcli/template-oss from 3.4.2 to 3.4.3 (#457)
    • c56a701 chore: postinstall for dependabot template-oss PR
    • e80c3d4 chore: bump @ npmcli/template-oss from 3.4.1 to 3.4.2
    • 238acc4 chore: bump @ npmcli/template-oss from 3.3.2 to 3.4.1 (#454)

    Compare


    Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.

    For more information:

    🧐 View latest project report

    🛠 Adjust upgrade PR settings

    🔕 Ignore this dependency or unsubscribe from future upgrade PRs

    opened by fraxken 0
Owner
A group of people 👯 moving toward a safer Node.js and JavaScript ecosystem 🐢🚀
null
A tiny cross-platform client for SQLite3, with precompiled binaries as the only third-party dependencies.

Tiny SQLite3 A tiny cross-platform client for SQLite3, with precompiled binaries as the only third-party dependencies. A nice feature about this modul

Fabio Spampinato 19 Oct 27, 2022
The Third (and hopefully last) Version Of The Beatshape API!

Beatshape API V3 This is The Third (and hopefully last) Version Of The Beatshape API! How To Run: Install Node.js Clone This Repo git clone https://gi

CDX Team 1 Dec 25, 2021
Calculating Pi number without limitation until 10k digits or more in your browser powered by JS without any third party library!

PI Calculator Web JS (Online) Calculating Pi number without limitation until 10k digits or more in your browser powered by JS without any third party

Max Base 6 Jul 27, 2022
Userscript developed by Stay & Third Party userscript available on Stay.

Stay offical userscript Get the userscript manager Stay² Developed by Stay Name Description Link 知乎@AutoExpand 自动展开回答,支持知乎桌面版 Get Google@PreventAppJum

shen yin 72 Nov 15, 2022
Minimal versions of popular analytics libraries. Reduce the impact of third-party scripts on your application.

minimal-analytics This project aims to provide minimal implementations of popular analytics libraries. It's aimed at users who want to reduce the impa

James Hill 32 Dec 25, 2022
A wrapper for valorant-api, a third-party API for getting data within Valorant. Available on npm

valorant-wrapper A wrapper for the third-party valorant-api How to Use All endpoints can be accessed off the ValAPI class. import { ValAPI } from 'val

Aircraft Overviewer 5 Nov 7, 2022
A third-party messenger application for Path of Exile.

PoE Instant Messenger Download (Windows) The latest release can be downloaded here Tool showcase Theme Setup Notifier Messenger Settings Light Dark Co

Cedric 11 Jul 29, 2022
This is the group project for the fourth week of the third module in the Microverse program.

Space Travelers' Hub This is the Space Travelers' Hub app initialized in the fourth week of the third module in the Microverse program. It was done us

Lucas Costa Rodrigues 8 Sep 4, 2022
A third-party VALORANT API wrapper library.

wrapper-valorant-api A NodeJS wrapper for the VALORANT API. Installation npm: npm i wrapper-valorant-api yarn: yarn add wrapper-valorant-api VAL-CONTE

LordPrinz 3 Dec 8, 2022
Quickly check your websites for third party requests.

Third Party Checker Tool for crawling websites and checking for third party requests using Puppeteer. Installation git clone https://github.com/pxlrbt

Dennis Koch 7 Nov 1, 2022