npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

newton-lib

v1.0.1

Published

A small library for advanced math.

Downloads

2

Readme

NPM

newton-lib-js

A small library for advanced math.

By Gerald Nash

LIBRARY


newton.simplify

Simplify the given expression

newton.simplify('x + x + 2 * 8')
returns
2x + 16

Argument(s): a string of the expression that is to be simplified

Return: A string of the simplified expression

newton.factor

Factor the given expression

newton.factor('x^2 - 1')
returns
(x - 1) (x + 1)

Argument(s): a string of the expression that is to be factored

Return: A string of the factored expression

newton.zeroes

Find the x values at which the function expression is equal to 0

newton.zeroes('x^2 - 1')
returns
[1, -1]

Argument(s): a string representation of the function of which the zeroes are to be found

Return: An array of the zeroes of the function

newton.derive

Find the first derivative of the function expression

newton.derive('x^2')
returns
2 x

Argument(s): a string representation of the function to be differentiated

Return: The first derivative of the given function expression

newton.integrate

Find an integral of the function expression

newton.integrate('x^2')
returns
1/3 x^3

Argument(s): a string representation of the function to be integrated

Return: A string representation of an integral of the given function expression

newton.tangent

Find the tangent line of a function at a given x value

newton.tangent('x^2', 1)
returns
2 x + -1

Argument(s): 1. a string representation of the function on which the tangent is to be found 2. a number representing the x value at which to find the tangent of the function

Return: A string representation of the tangent function expression

newton.areaUnder

Find area under a given function between two x values

newton.areaUnder('x^2', { start: 1, finish: 3})
returns
8

Argument(s): 1. a string representation of the function under which the area is to be found 2. an object with properties start and finish representing the x values between which the area will be found under the function

Return: A number representation of the area under the given function between the two x values


Copyright (c) 2017 Gerald Nash. Built using Algebrite and Mathjs Licensed under the MIT license.