New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

primes-simple

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

primes-simple

Simple prime number and prime factorization package

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

npm-primes-simple: Node.js Package for Prime Factorization

npm package

npm version

A simple Node.js package for either testing whether a number is prime, or returning the prime factors if a number is not prime.

Installing

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Install package with:

npm install --save primes-simple

In example.js, a few examples are shown.

To run:

const primes = require('primes-simple')
let num = getRandomInt(10000,1000000) //or any num
prime(num)

Running Tests

index.test.js provides three tests for benchmarking purposes, and personalized tests may be generated. Simply follow the sytax, making sure to use assert.deepEqual. If the dependency for running tests (Mocha) is properly installed, simply write your tests and run npm run test in the console/terminal.

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Keywords

prime

FAQs

Package last updated on 11 Oct 2018

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