You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

tonal-array

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tonal-array - npm Package Compare versions

Comparing version

to
2.0.0

coverage/clover.xml

8

build/es5.js

@@ -17,3 +17,3 @@ 'use strict';

* @example
* const Array = require("tonal-array)
* const Array = require("tonal-array")
* Array.range(1, 4) // => [1, 2, 3, 4]

@@ -79,5 +79,5 @@ *

// a function that get note heights (with negative number for pitch classes)
var height = function (n) {
var m = tonalNote.midi(n);
return m !== null ? m : tonalNote.midi(n + "-100");
var height = function (name$$1) {
var m = tonalNote.props(name$$1).midi;
return m !== null ? m : tonalNote.props(name$$1 + "-100").midi;
};

@@ -84,0 +84,0 @@

@@ -11,3 +11,3 @@ /**

* @example
* const Array = require("tonal-array)
* const Array = require("tonal-array")
* Array.range(1, 4) // => [1, 2, 3, 4]

@@ -17,3 +17,3 @@ *

*/
import { midi, name } from "tonal-note";
import { props, name } from "tonal-note";

@@ -76,5 +76,5 @@ // ascending range

// a function that get note heights (with negative number for pitch classes)
var height = function (n) {
var m = midi(n);
return m !== null ? m : midi(n + "-100");
var height = function (name) {
var m = props(name).midi;
return m !== null ? m : props(name + "-100").midi;
};

@@ -81,0 +81,0 @@

@@ -11,3 +11,3 @@ /**

* @example
* const Array = require("tonal-array)
* const Array = require("tonal-array")
* Array.range(1, 4) // => [1, 2, 3, 4]

@@ -17,3 +17,3 @@ *

*/
import { midi, name } from "tonal-note";
import { props, name } from "tonal-note";

@@ -76,5 +76,5 @@ // ascending range

// a function that get note heights (with negative number for pitch classes)
const height = n => {
const m = midi(n);
return m !== null ? m : midi(n + "-100");
const height = name => {
const m = props(name).midi;
return m !== null ? m : props(name + "-100").midi;
};

@@ -81,0 +81,0 @@

{
"name": "tonal-array",
"version": "1.1.2",
"version": "2.0.0",
"description": "Tonal array utilities",

@@ -20,3 +20,3 @@ "repository": "https://github.com/danigb/tonal/packages/array",

"dependencies": {
"tonal-note": "^1.1.2"
"tonal-note": "^2.0.0"
},

@@ -23,0 +23,0 @@ "babel": {

@@ -26,2 +26,5 @@ /* global describe it expect */

expect(array.sort($("c f g a b h j"))).toEqual($("C F G A B"));
expect(array.sort($("c f g a b h j j h b a g f c"))).toEqual(
$("C C F F G G A A B B")
);
expect(array.sort($("c2 c5 c1 c0 c6 c"))).toEqual($("C C0 C1 C2 C5 C6"));

@@ -28,0 +31,0 @@ });

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.