modular-scale
Advanced tools
Comparing version 2.0.0 to 3.0.0
10
index.js
@@ -29,2 +29,9 @@ var msBases = [1]; | ||
ratios = ratios.map(function(ratio) { | ||
if (typeof ratio === 'string') { | ||
ratio = ratioNames[ratio] || 0 | ||
} | ||
return ratio | ||
}); | ||
return function ms(value) { | ||
@@ -37,5 +44,2 @@ var r = [] | ||
if (typeof value === 'string') { | ||
value = ratioNames[value] || 0 | ||
} | ||
@@ -42,0 +46,0 @@ for (ratio = 0; ratio < ratios.length; ratio++) { |
{ | ||
"name": "modular-scale", | ||
"version": "2.0.0", | ||
"version": "3.0.0", | ||
"description": "Module for generating a modular scale.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -8,2 +8,10 @@ var mocha = require('mocha'), | ||
it('should use ratio names', function() { | ||
ms = modularScale({ | ||
ratios: ['majorTwelfth'], | ||
bases: [1] | ||
}) | ||
expect(ms(3)).to.equal(27) | ||
}); | ||
it('should return octave scale with multiple bases', function() { | ||
@@ -10,0 +18,0 @@ ms = modularScale({ |
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
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
6848
138
0