Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mml-optimizer

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mml-optimizer - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

20

lib/generate.js

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc