New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

log-base-n

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

log-base-n

Logarithms of any base using the change of base principle

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
increased by66.67%
Maintainers
1
Weekly downloads
 
Created
Source

log-b

Find the logarithm of any number with any base in code or with the command line.

This project uses the division property of logarithms to determine the logarithm with any base. Read more here.

Usage

import logBase from 'log-base-n'

logBase(2, 8) // returns 3

ES5 Usage

var logBase = require('log-base-n').default // this is because it is an ES6 default export

logBase(2, 8) // returns 3

Contributing

If you want to contribute, implement it in TypeScript in the src/ directory. Add a test file in __tests__/ to make sure it works properly – you can just copy one of the other testing files and substitute in your sorting algorithm.

License

This project is licensed under the MIT License, so you're free to use it as you please with attribution and a link back to this project (though writing your own implementation would not be terribly difficult).

Credits

Written by Wilson Hobbs, 2019.

FAQs

Package last updated on 24 Apr 2019

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