New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
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 1.0.0-pre5 to 1.0.0-pre6

24

build/es5.js

@@ -7,2 +7,18 @@ 'use strict';

/**
* [![npm version](https://img.shields.io/npm/v/tonal-array.svg?style=flat-square)](https://www.npmjs.com/package/tonal-array)
*
* A scale is a collection of pitches in ascending or descending order.
*
* This module provides functions to get and manipulate scales.
*
* @example
* import * as array;
* array.sort(["f", "a", "c"]) // => ['C', 'F', 'A']
*
* @example
* const array = require('tonal-array)
* array.range(1, 4) // => [1, 2, 3, 4]
* @module array
*/
// ascending range

@@ -34,2 +50,3 @@ function ascR(b, n) {

/**
*
* Rotates a list a number of times. It's completly agnostic about the

@@ -41,10 +58,11 @@ * contents of the list.

*/
var rotate = function (times, arr) {
function rotate(times, arr) {
var len = arr.length;
var n = (times % len + len) % len;
return arr.slice(n, len).concat(arr.slice(0, n));
};
}
/**
* Return a copy of the array with the null values removed
* @function
* @param {Array} array

@@ -66,3 +84,2 @@ * @return {Array}

*
* @private
* @param {String|Array} notes

@@ -78,3 +95,2 @@ * @return {Array} sorted array of notes

*
* @private
* @function

@@ -81,0 +97,0 @@ * @param {Array} notes

@@ -0,1 +1,17 @@

/**
* [![npm version](https://img.shields.io/npm/v/tonal-array.svg?style=flat-square)](https://www.npmjs.com/package/tonal-array)
*
* A scale is a collection of pitches in ascending or descending order.
*
* This module provides functions to get and manipulate scales.
*
* @example
* import * as array;
* array.sort(["f", "a", "c"]) // => ['C', 'F', 'A']
*
* @example
* const array = require('tonal-array)
* array.range(1, 4) // => [1, 2, 3, 4]
* @module array
*/
import { midi, name } from "tonal-note";

@@ -29,2 +45,3 @@

/**
*
* Rotates a list a number of times. It's completly agnostic about the

@@ -36,10 +53,11 @@ * contents of the list.

*/
export var rotate = function (times, arr) {
export function rotate(times, arr) {
var len = arr.length;
var n = (times % len + len) % len;
return arr.slice(n, len).concat(arr.slice(0, n));
};
}
/**
* Return a copy of the array with the null values removed
* @function
* @param {Array} array

@@ -61,3 +79,2 @@ * @return {Array}

*
* @private
* @param {String|Array} notes

@@ -73,3 +90,2 @@ * @return {Array} sorted array of notes

*
* @private
* @function

@@ -76,0 +92,0 @@ * @param {Array} notes

@@ -0,1 +1,17 @@

/**
* [![npm version](https://img.shields.io/npm/v/tonal-array.svg?style=flat-square)](https://www.npmjs.com/package/tonal-array)
*
* A scale is a collection of pitches in ascending or descending order.
*
* This module provides functions to get and manipulate scales.
*
* @example
* import * as array;
* array.sort(["f", "a", "c"]) // => ['C', 'F', 'A']
*
* @example
* const array = require('tonal-array)
* array.range(1, 4) // => [1, 2, 3, 4]
* @module array
*/
import { midi, name } from "tonal-note";

@@ -29,2 +45,3 @@

/**
*
* Rotates a list a number of times. It's completly agnostic about the

@@ -36,10 +53,11 @@ * contents of the list.

*/
export const rotate = (times, arr) => {
export function rotate(times, arr) {
var len = arr.length;
var n = (times % len + len) % len;
return arr.slice(n, len).concat(arr.slice(0, n));
};
}
/**
* Return a copy of the array with the null values removed
* @function
* @param {Array} array

@@ -61,3 +79,2 @@ * @return {Array}

*
* @private
* @param {String|Array} notes

@@ -73,3 +90,2 @@ * @return {Array} sorted array of notes

*
* @private
* @function

@@ -76,0 +92,0 @@ * @param {Array} notes

4

package.json
{
"name": "tonal-array",
"version": "1.0.0-pre5",
"version": "1.0.0-pre6",
"description": "Create and manipulate arrays of notes and intervals",

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

"dependencies": {
"tonal-note": "^1.0.0-pre5"
"tonal-note": "^1.0.0-pre6"
},

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

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