mirror of
https://github.com/josdejong/mathjs.git
synced 2026-01-25 15:07:57 +00:00
Merge pull request #1092 from harrysarson/use-strict
Tidy javascript files in lib
This commit is contained in:
commit
5890ca6f3d
@ -77,4 +77,4 @@ function setLazyConstant (math, name, resolver) {
|
||||
|
||||
exports.factory = factory;
|
||||
exports.lazy = false; // no lazy loading of constants, the constants themselves are lazy when needed
|
||||
exports.math = true; // request access to the math namespace
|
||||
exports.math = true; // request access to the math namespace
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
var isFactory = require('./../utils/object').isFactory;
|
||||
var typedFactory = require('./typed');
|
||||
var emitter = require('./../utils/emitter');
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
var typedFunction = require('typed-function');
|
||||
var digits = require('./../utils/number').digits;
|
||||
var isBigNumber = require('./../utils/bignumber/isBigNumber');
|
||||
|
||||
@ -63,4 +63,4 @@ function factory (type, config, load, typed) {
|
||||
}
|
||||
|
||||
exports.name = 'eval';
|
||||
exports.factory = factory;
|
||||
exports.factory = factory;
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
module.exports = [
|
||||
require('./compile'),
|
||||
require('./eval'),
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
module.exports = [
|
||||
// Note that the docs folder is called "embeddedDocs" and not "docs" to prevent issues
|
||||
// with yarn autoclean. See https://github.com/josdejong/mathjs/issues/969
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
module.exports = [
|
||||
require('./AccessorNode'),
|
||||
require('./ArrayNode'),
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
var IndexError = require('../../error/IndexError');
|
||||
|
||||
/**
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
module.exports = [
|
||||
require('./concat.transform'),
|
||||
require('./filter.transform'),
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
function factory (type, config, load, typed) {
|
||||
/**
|
||||
* Compile an inline expression like "x > 0"
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
module.exports = [
|
||||
require('./derivative'),
|
||||
|
||||
|
||||
@ -604,4 +604,4 @@ function factory (type, config, load, typed) {
|
||||
} // end of factory
|
||||
|
||||
exports.name = 'rationalize';
|
||||
exports.factory = factory;
|
||||
exports.factory = factory;
|
||||
|
||||
@ -155,4 +155,4 @@ function factory(type, config, load, typed, math) {
|
||||
}
|
||||
|
||||
exports.factory = factory;
|
||||
exports.math = true;
|
||||
exports.math = true;
|
||||
|
||||
@ -159,4 +159,4 @@ function factory (type) {
|
||||
return solveValidation;
|
||||
}
|
||||
|
||||
exports.factory = factory;
|
||||
exports.factory = factory;
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
module.exports = [
|
||||
require('./abs'),
|
||||
require('./add'),
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
module.exports = [
|
||||
require('./bitAnd'),
|
||||
require('./bitNot'),
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
module.exports = [
|
||||
require('./bellNumbers'),
|
||||
require('./composition'),
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
module.exports = [
|
||||
require('./arg'),
|
||||
require('./conj'),
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
module.exports = [
|
||||
require('./intersect'),
|
||||
require('./distance')
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
module.exports = [
|
||||
require('./algebra'),
|
||||
require('./arithmetic'),
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
module.exports = [
|
||||
require('./and'),
|
||||
require('./not'),
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
module.exports = [
|
||||
require('./concat'),
|
||||
require('./cross'),
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
module.exports = [
|
||||
//require('./distribution'), // TODO: rethink math.distribution
|
||||
require('./combinations'),
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
module.exports = [
|
||||
require('./compare'),
|
||||
require('./compareNatural'),
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
module.exports = [
|
||||
require('./setCartesian'),
|
||||
require('./setDifference'),
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
module.exports = [
|
||||
require('./erf')
|
||||
];
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
module.exports = [
|
||||
require('./mad'),
|
||||
require('./max'),
|
||||
|
||||
@ -74,4 +74,4 @@ function factory (type, config, load, typed) {
|
||||
}
|
||||
|
||||
exports.name = 'mode';
|
||||
exports.factory = factory;
|
||||
exports.factory = factory;
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
|
||||
|
||||
function factory (type, config, load, typed) {
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
module.exports = [
|
||||
require('./format'),
|
||||
require('./print')
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
module.exports = [
|
||||
require('./acos'),
|
||||
require('./acosh'),
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
module.exports = [
|
||||
require('./to')
|
||||
];
|
||||
];
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
module.exports = [
|
||||
require('./clone'),
|
||||
require('./isInteger'),
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
/**
|
||||
* math.js
|
||||
* https://github.com/josdejong/mathjs
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
module.exports = [
|
||||
require('./type'), // data types (Matrix, Complex, Unit, ...)
|
||||
require('./constants'), // constants
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
module.exports = [
|
||||
require('./reviver')
|
||||
];
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
var Decimal = require('decimal.js/decimal.js'); // make sure to pick the es5 version
|
||||
|
||||
function factory (type, config, load, typed, math) {
|
||||
@ -45,4 +46,4 @@ function factory (type, config, load, typed, math) {
|
||||
exports.name = 'BigNumber';
|
||||
exports.path = 'type';
|
||||
exports.factory = factory;
|
||||
exports.math = true; // request access to the math namespace
|
||||
exports.math = true; // request access to the math namespace
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
module.exports = [
|
||||
// type
|
||||
require('./BigNumber'),
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
module.exports = [
|
||||
// type
|
||||
require('./Chain'),
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
var Complex = require('complex.js');
|
||||
var format = require('../../utils/number').format;
|
||||
var isNumber = require('../../utils/number').isNumber;
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
module.exports = [
|
||||
// type
|
||||
require('./Complex'),
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
var Fraction = require('fraction.js');
|
||||
|
||||
/**
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
module.exports = [
|
||||
// type
|
||||
require('./Fraction'),
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
module.exports = [
|
||||
require('./bignumber'),
|
||||
require('./boolean'),
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
module.exports = [
|
||||
// types
|
||||
require('./Matrix'),
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
module.exports = [
|
||||
// type
|
||||
require('./ResultSet')
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
module.exports = [
|
||||
// type
|
||||
require('./Unit'),
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
var lazy = require('../../utils/object').lazy;
|
||||
|
||||
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
var bitwise = require('./bitwise');
|
||||
|
||||
/**
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
/**
|
||||
* Bitwise not
|
||||
* @param {BigNumber} value
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
var bitwise = require('./bitwise');
|
||||
|
||||
/**
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
var bitwise = require('./bitwise');
|
||||
var bitNot = require('./bitNot');
|
||||
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
var bitNot = require('./bitNot');
|
||||
|
||||
/**
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
var memoize = require('../function').memoize;
|
||||
|
||||
/**
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
/**
|
||||
* Convert a BigNumber to a formatted string representation.
|
||||
*
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
/**
|
||||
* Test whether a value is a BigNumber
|
||||
* @param {*} x
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Bitwise left shift
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
/*
|
||||
* Special Cases:
|
||||
* n >> -n = N
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
var Emitter = require('tiny-emitter');
|
||||
|
||||
/**
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
// function utils
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user