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-pre6 to 1.0.0

38

build/es5.js

@@ -10,14 +10,13 @@ 'use strict';

*
* A scale is a collection of pitches in ascending or descending order.
*
* This module provides functions to get and manipulate scales.
* Tonal array utilities. Create ranges, sort notes, ...
*
* @example
* import * as array;
* array.sort(["f", "a", "c"]) // => ['C', 'F', 'A']
* 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
* const Array = require("tonal-array)
* Array.range(1, 4) // => [1, 2, 3, 4]
*
* @module Array
*/

@@ -37,8 +36,10 @@ // ascending range

* Create a numeric range
*
* @param {Number} from
* @param {Number} to
* @return {Array}
* @return {Array}
*
* @example
* array.range(-2, 2) // => [-2, -1, 0, 1, 2]
* array.range(2, -2) // => [2, 1, 0, -1, -2]
* Array.range(-2, 2) // => [-2, -1, 0, 1, 2]
* Array.range(2, -2) // => [2, 1, 0, -1, -2]
*/

@@ -52,7 +53,10 @@ function range(a, b) {

*
* Rotates a list a number of times. It's completly agnostic about the
* Rotates a list a number of times. It"s completly agnostic about the
* contents of the list.
*
* @param {Integer} times - the number of rotations
* @param {Array} array
* @return {Array} the rotated array
* @example
* Array.rotate(1, [1, 2, 3]) // => [2, 3, 1]
*/

@@ -70,4 +74,5 @@ function rotate(times, arr) {

* @return {Array}
*
* @example
* tonal.compact(['a', 'b', null, 'c']) // => ['a', 'b', 'c']
* Array.compact(["a", "b", null, "c"]) // => ["a", "b", "c"]
*/

@@ -111,4 +116,3 @@ var compact = function (arr) { return arr.filter(function (n) { return n === 0 || n; }); };

* @example
* import * as array from 'tonal-array'
* array.shuffle(["C", "D", "E", "F"])
* Array.shuffle(["C", "D", "E", "F"])
*/

@@ -130,6 +134,6 @@ var shuffle = function (arr, rnd) {

/**
* Get all permutations of a list
* Get all permutations of an array
* http://stackoverflow.com/questions/9960908/permutations-in-javascript
*
* @param {Array|Strng} list - the list
* @param {Array} array - the array
* @return {Array<Array>} an array with all the permutations

@@ -136,0 +140,0 @@ */

/**
* [![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.
* Tonal array utilities. Create ranges, sort notes, ...
*
* @example
* import * as array;
* array.sort(["f", "a", "c"]) // => ['C', 'F', 'A']
* 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
* const Array = require("tonal-array)
* Array.range(1, 4) // => [1, 2, 3, 4]
*
* @module Array
*/

@@ -32,8 +31,10 @@ import { midi, name } from "tonal-note";

* Create a numeric range
*
* @param {Number} from
* @param {Number} to
* @return {Array}
* @return {Array}
*
* @example
* array.range(-2, 2) // => [-2, -1, 0, 1, 2]
* array.range(2, -2) // => [2, 1, 0, -1, -2]
* Array.range(-2, 2) // => [-2, -1, 0, 1, 2]
* Array.range(2, -2) // => [2, 1, 0, -1, -2]
*/

@@ -47,7 +48,10 @@ export function range(a, b) {

*
* Rotates a list a number of times. It's completly agnostic about the
* Rotates a list a number of times. It"s completly agnostic about the
* contents of the list.
*
* @param {Integer} times - the number of rotations
* @param {Array} array
* @return {Array} the rotated array
* @example
* Array.rotate(1, [1, 2, 3]) // => [2, 3, 1]
*/

@@ -65,4 +69,5 @@ export function rotate(times, arr) {

* @return {Array}
*
* @example
* tonal.compact(['a', 'b', null, 'c']) // => ['a', 'b', 'c']
* Array.compact(["a", "b", null, "c"]) // => ["a", "b", "c"]
*/

@@ -106,4 +111,3 @@ export var compact = function (arr) { return arr.filter(function (n) { return n === 0 || n; }); };

* @example
* import * as array from 'tonal-array'
* array.shuffle(["C", "D", "E", "F"])
* Array.shuffle(["C", "D", "E", "F"])
*/

@@ -125,6 +129,6 @@ export var shuffle = function (arr, rnd) {

/**
* Get all permutations of a list
* Get all permutations of an array
* http://stackoverflow.com/questions/9960908/permutations-in-javascript
*
* @param {Array|Strng} list - the list
* @param {Array} array - the array
* @return {Array<Array>} an array with all the permutations

@@ -131,0 +135,0 @@ */

/**
* [![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.
* Tonal array utilities. Create ranges, sort notes, ...
*
* @example
* import * as array;
* array.sort(["f", "a", "c"]) // => ['C', 'F', 'A']
* 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
* const Array = require("tonal-array)
* Array.range(1, 4) // => [1, 2, 3, 4]
*
* @module Array
*/

@@ -32,8 +31,10 @@ import { midi, name } from "tonal-note";

* Create a numeric range
*
* @param {Number} from
* @param {Number} to
* @return {Array}
* @return {Array}
*
* @example
* array.range(-2, 2) // => [-2, -1, 0, 1, 2]
* array.range(2, -2) // => [2, 1, 0, -1, -2]
* Array.range(-2, 2) // => [-2, -1, 0, 1, 2]
* Array.range(2, -2) // => [2, 1, 0, -1, -2]
*/

@@ -47,7 +48,10 @@ export function range(a, b) {

*
* Rotates a list a number of times. It's completly agnostic about the
* Rotates a list a number of times. It"s completly agnostic about the
* contents of the list.
*
* @param {Integer} times - the number of rotations
* @param {Array} array
* @return {Array} the rotated array
* @example
* Array.rotate(1, [1, 2, 3]) // => [2, 3, 1]
*/

@@ -65,4 +69,5 @@ export function rotate(times, arr) {

* @return {Array}
*
* @example
* tonal.compact(['a', 'b', null, 'c']) // => ['a', 'b', 'c']
* Array.compact(["a", "b", null, "c"]) // => ["a", "b", "c"]
*/

@@ -106,4 +111,3 @@ export const compact = arr => arr.filter(n => n === 0 || n);

* @example
* import * as array from 'tonal-array'
* array.shuffle(["C", "D", "E", "F"])
* Array.shuffle(["C", "D", "E", "F"])
*/

@@ -123,6 +127,6 @@ export var shuffle = (arr, rnd = Math.random) => {

/**
* Get all permutations of a list
* Get all permutations of an array
* http://stackoverflow.com/questions/9960908/permutations-in-javascript
*
* @param {Array|Strng} list - the list
* @param {Array} array - the array
* @return {Array<Array>} an array with all the permutations

@@ -129,0 +133,0 @@ */

{
"name": "tonal-array",
"version": "1.0.0-pre6",
"description": "Create and manipulate arrays of notes and intervals",
"version": "1.0.0",
"description": "Tonal array utilities",
"repository": "https://github.com/danigb/tonal/packages/array",

@@ -20,3 +20,3 @@ "keywords": [

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

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