Comparing version 0.1.0 to 0.1.1
@@ -12,1 +12,23 @@ /* | ||
}; | ||
/** | ||
* Method to add new algorithms via | ||
* @param {String} name Name of algorithm | ||
* @param {Function} algorithm Algorithm to bind under name | ||
*/ | ||
function addAlgorithm(name, algorithm) { | ||
// Save the algorithm to algorithms | ||
algorithms[name] = algorithm; | ||
} | ||
// Make algorithms easier to add | ||
Spritesmith.addAlgorithm = addAlgorithm; | ||
Spritesmith.algorithms = algorithms; | ||
// Add default algorithms | ||
addAlgorithm('top-down', require('./algorithms/top-down.algorithm.js')); | ||
addAlgorithm('bottom-up', require('./algorithms/bottom-up.algorithm.js')); | ||
addAlgorithm('left-right', require('./algorithms/left-right.algorithm.js')); | ||
addAlgorithm('right-left', require('./algorithms/right-left.algorithm.js')); | ||
addAlgorithm('diagonal', require('./algorithms/diagonal.algorithm.js')); | ||
addAlgorithm('negative-diagonal', require('./algorithms/negative-diagonal.algorithm.js')); | ||
addAlgorithm('reverse-diagonal', require('./algorithms/reverse-diagonal.algorithm.js')); |
{ | ||
"name": "layout", | ||
"description": "Organize and layout items based on various algorithms", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"homepage": "https://github.com/twolfson/layout", | ||
@@ -6,0 +6,0 @@ "author": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12064
15
330
1