Merge pull request #1092 from harrysarson/use-strict

Tidy javascript files in lib
This commit is contained in:
Jos de Jong 2018-04-30 20:30:50 +02:00 committed by GitHub
commit 5890ca6f3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
60 changed files with 62 additions and 8 deletions

View File

@ -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

View File

@ -1,3 +1,4 @@
'use strict';
var isFactory = require('./../utils/object').isFactory;
var typedFactory = require('./typed');
var emitter = require('./../utils/emitter');

View File

@ -1,3 +1,4 @@
'use strict';
var typedFunction = require('typed-function');
var digits = require('./../utils/number').digits;
var isBigNumber = require('./../utils/bignumber/isBigNumber');

View File

@ -63,4 +63,4 @@ function factory (type, config, load, typed) {
}
exports.name = 'eval';
exports.factory = factory;
exports.factory = factory;

View File

@ -1,3 +1,4 @@
'use strict';
module.exports = [
require('./compile'),
require('./eval'),

View File

@ -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

View File

@ -1,3 +1,4 @@
'use strict';
module.exports = [
require('./AccessorNode'),
require('./ArrayNode'),

View File

@ -1,3 +1,4 @@
'use strict';
var IndexError = require('../../error/IndexError');
/**

View File

@ -1,3 +1,4 @@
'use strict';
module.exports = [
require('./concat.transform'),
require('./filter.transform'),

View File

@ -1,3 +1,4 @@
'use strict';
function factory (type, config, load, typed) {
/**
* Compile an inline expression like "x > 0"

View File

@ -1,3 +1,4 @@
'use strict';
module.exports = [
require('./derivative'),

View File

@ -604,4 +604,4 @@ function factory (type, config, load, typed) {
} // end of factory
exports.name = 'rationalize';
exports.factory = factory;
exports.factory = factory;

View File

@ -155,4 +155,4 @@ function factory(type, config, load, typed, math) {
}
exports.factory = factory;
exports.math = true;
exports.math = true;

View File

@ -159,4 +159,4 @@ function factory (type) {
return solveValidation;
}
exports.factory = factory;
exports.factory = factory;

View File

@ -1,3 +1,4 @@
'use strict';
module.exports = [
require('./abs'),
require('./add'),

View File

@ -1,3 +1,4 @@
'use strict';
module.exports = [
require('./bitAnd'),
require('./bitNot'),

View File

@ -1,3 +1,4 @@
'use strict';
module.exports = [
require('./bellNumbers'),
require('./composition'),

View File

@ -1,3 +1,4 @@
'use strict';
module.exports = [
require('./arg'),
require('./conj'),

View File

@ -1,3 +1,4 @@
'use strict';
module.exports = [
require('./intersect'),
require('./distance')

View File

@ -1,3 +1,4 @@
'use strict';
module.exports = [
require('./algebra'),
require('./arithmetic'),

View File

@ -1,3 +1,4 @@
'use strict';
module.exports = [
require('./and'),
require('./not'),

View File

@ -1,3 +1,4 @@
'use strict';
module.exports = [
require('./concat'),
require('./cross'),

View File

@ -1,3 +1,4 @@
'use strict';
module.exports = [
//require('./distribution'), // TODO: rethink math.distribution
require('./combinations'),

View File

@ -1,3 +1,4 @@
'use strict';
module.exports = [
require('./compare'),
require('./compareNatural'),

View File

@ -1,3 +1,4 @@
'use strict';
module.exports = [
require('./setCartesian'),
require('./setDifference'),

View File

@ -1,3 +1,4 @@
'use strict';
module.exports = [
require('./erf')
];

View File

@ -1,3 +1,4 @@
'use strict';
module.exports = [
require('./mad'),
require('./max'),

View File

@ -74,4 +74,4 @@ function factory (type, config, load, typed) {
}
exports.name = 'mode';
exports.factory = factory;
exports.factory = factory;

View File

@ -1,3 +1,4 @@
'use strict';
function factory (type, config, load, typed) {

View File

@ -1,3 +1,4 @@
'use strict';
module.exports = [
require('./format'),
require('./print')

View File

@ -1,3 +1,4 @@
'use strict';
module.exports = [
require('./acos'),
require('./acosh'),

View File

@ -1,3 +1,4 @@
'use strict';
module.exports = [
require('./to')
];
];

View File

@ -1,3 +1,4 @@
'use strict';
module.exports = [
require('./clone'),
require('./isInteger'),

View File

@ -1,3 +1,4 @@
'use strict';
/**
* math.js
* https://github.com/josdejong/mathjs

View File

@ -1,3 +1,4 @@
'use strict';
module.exports = [
require('./type'), // data types (Matrix, Complex, Unit, ...)
require('./constants'), // constants

View File

@ -1,3 +1,4 @@
'use strict';
module.exports = [
require('./reviver')
];

View File

@ -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

View File

@ -1,3 +1,4 @@
'use strict';
module.exports = [
// type
require('./BigNumber'),

View File

@ -1,3 +1,4 @@
'use strict';
module.exports = [
// type
require('./Chain'),

View File

@ -1,3 +1,4 @@
'use strict';
var Complex = require('complex.js');
var format = require('../../utils/number').format;
var isNumber = require('../../utils/number').isNumber;

View File

@ -1,3 +1,4 @@
'use strict';
module.exports = [
// type
require('./Complex'),

View File

@ -1,3 +1,4 @@
'use strict';
var Fraction = require('fraction.js');
/**

View File

@ -1,3 +1,4 @@
'use strict';
module.exports = [
// type
require('./Fraction'),

View File

@ -1,3 +1,4 @@
'use strict';
module.exports = [
require('./bignumber'),
require('./boolean'),

View File

@ -1,3 +1,4 @@
'use strict';
module.exports = [
// types
require('./Matrix'),

View File

@ -1,3 +1,4 @@
'use strict';
module.exports = [
// type
require('./ResultSet')

View File

@ -1,3 +1,4 @@
'use strict';
module.exports = [
// type
require('./Unit'),

View File

@ -1,3 +1,4 @@
'use strict';
var lazy = require('../../utils/object').lazy;

View File

@ -1,3 +1,4 @@
'use strict';
var bitwise = require('./bitwise');
/**

View File

@ -1,3 +1,4 @@
'use strict';
/**
* Bitwise not
* @param {BigNumber} value

View File

@ -1,3 +1,4 @@
'use strict';
var bitwise = require('./bitwise');
/**

View File

@ -1,3 +1,4 @@
'use strict';
var bitwise = require('./bitwise');
var bitNot = require('./bitNot');

View File

@ -1,3 +1,4 @@
'use strict';
var bitNot = require('./bitNot');
/**

View File

@ -1,3 +1,4 @@
'use strict';
var memoize = require('../function').memoize;
/**

View File

@ -1,3 +1,4 @@
'use strict';
/**
* Convert a BigNumber to a formatted string representation.
*

View File

@ -1,3 +1,4 @@
'use strict';
/**
* Test whether a value is a BigNumber
* @param {*} x

View File

@ -1,3 +1,4 @@
'use strict';
/**
* Bitwise left shift

View File

@ -1,3 +1,4 @@
'use strict';
/*
* Special Cases:
* n >> -n = N

View File

@ -1,3 +1,4 @@
'use strict';
var Emitter = require('tiny-emitter');
/**

View File

@ -1,3 +1,4 @@
'use strict';
// function utils
/**