Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

beyondjava-example-base-library

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

beyondjava-example-base-library

Base library demonstrating how npm resolves transitive dependencies

  • 3.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

Simple demo showing that npm and Webpack can bundle different versions of the same library. Read the full story at https://www.beyondjava.net/npm-transitive-dependencies.

There are three versions of the library:

Version 1.2.0

function printDeepThoughts() {
    console.log(42);
    return 42;
}

module.exports = printDeepThoughts;

Version 2.1.0

function printDeepThoughts() {
    console.log('21 is only half the truth');
    return 21;
}

module.exports = printDeepThoughts;

Version 3.0.x

class DeepThought {
    printDeepThoughts() {
        console.log('84 is twice the truth');
        return 84;
    }
    
}

module.exports = { DeepThought };

FAQs

Package last updated on 29 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc