From df3a1f599bd443ff41dfac11d7145a9f5c0cb9f9 Mon Sep 17 00:00:00 2001 From: Vaishnavi S Date: Wed, 12 Nov 2025 07:29:57 +0530 Subject: [PATCH] docs: add descriptive module docstring for npm package handler Signed-off-by: Vaishnavi S --- src/packagedcode/npm.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/packagedcode/npm.py b/src/packagedcode/npm.py index 779ff281668..472650d1a99 100644 --- a/src/packagedcode/npm.py +++ b/src/packagedcode/npm.py @@ -5,7 +5,8 @@ # See http://www.apache.org/licenses/LICENSE-2.0 for the license text. # See https://github.com/nexB/scancode-toolkit for support or download. # See https://aboutcode.org for more information about nexB OSS projects. -# + + import base64 import io import fnmatch @@ -30,13 +31,13 @@ import saneyaml """ -Handle Node.js npm packages -per https://docs.npmjs.com/files/package.json -""" +This module helps ScanCode understand and work with Node.js (npm) packages. +It reads information from package.json files, such as the package name, +version, dependencies, and other metadata. This helps ScanCode detect +licenses, dependencies, and package details when scanning JavaScript projects. """ -To check https://github.com/npm/normalize-package-data -""" + SCANCODE_DEBUG_PACKAGE = os.environ.get('SCANCODE_DEBUG_PACKAGE', False)