This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is a variant on the toFixed method on accountingJS using string manipulation instead of exponential form | |
var toFixed = lib.toFixed = function (value, precision) { | |
precision = checkPrecision(precision, lib.settings.number.precision); | |
// Using exponentialForm | |
// var exponentialForm = Number(lib.unformat(value) + 'e' + precision); | |
// var rounded = Math.round(exponentialForm); | |
// var finalResult = Number(rounded + 'e-' + precision).toFixed(precision); | |
// return finalResult; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="simpletest.js"></script> | |
<script> | |
/* | |
The function isPrototypeOf should work just like Object.prototype.isPrototypeOf | |
Syntax: | |
Formula: isPrototypeOf(parentObject, childObject) | |
Arguments: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="simpletest.js"></script> | |
<script> | |
/* | |
The librarySystem should be able to store libraries with dependencies and return the library if called | |
Syntax: | |
Formula: librarySystem(libraryName, dependencyArray, callbackLibrary) | |
Arguments: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="simpletest.js"></script> | |
<script> | |
/* | |
The librarySystem should be able to store libraries with dependencies and return the library if called | |
Syntax: | |
Formula: librarySystem(libraryName, dependencyArray, callbackLibrary) | |
Arguments: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="simpletest.js"></script> | |
<script> | |
/* | |
The runWithDebugger function should run a callback with a debugger | |
Syntax: | |
Formula: runWithDebugger(callback, [callbackArguments]) | |
Arguments: |
NewerOlder