mml-optimizer
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -6,9 +6,15 @@ var extend = require('extend'); | ||
return tokens.reduce(function (acc, token) { | ||
return extend(acc, { | ||
text: acc.text + tokenText(token, acc, options), | ||
octave: token.type === 'octave' ? token.octave : acc.octave, | ||
tempo: token.type === 'tempo' ? token.tempo : acc.tempo, | ||
volume: token.type === 'volume' ? token.volume : acc.volume, | ||
duration: token.type === 'duration' ? token.duration : acc.duration | ||
}); | ||
var nextText = acc.text + tokenText(token, acc, options); | ||
switch (token.type) { | ||
case 'octave': return extend(acc, { text: nextText, octave: token.octave }); | ||
case 'tempo': return extend(acc, { text: nextText, tempo: token.tempo }); | ||
case 'volume': return extend(acc, { text: nextText, volume: token.volume }); | ||
case 'duration': return extend(acc, { text: nextText, duration: token.duration }); | ||
case 'nextVoice': | ||
return options.tracksShareState ? | ||
extend({}, acc, { text: nextText }) : | ||
extend({}, options.defaultState, { text: nextText }); | ||
default: | ||
return extend({}, acc, { text: nextText }); | ||
} | ||
}, extend({}, options.defaultState, { text: '' })).text; | ||
@@ -15,0 +21,0 @@ } |
{ | ||
"name": "mml-optimizer", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "Optimizer for Music Macro Language (MML)", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
20045
650
0