New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

tonal-key

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tonal-key - npm Package Compare versions

Comparing version 0.50.0 to 0.50.1

17

build/tonal-key.js

@@ -59,16 +59,3 @@ 'use strict';

/**
* Test if a given object is a key object
* @param {Object} obj - the object to test
* @return {Boolean} true if it's a key object
* @see build
*/
function isKey (o) {
return tonalNotation.isArr(o) && isKeyMode(o[0])
}
/**
* Test if the given object is a key with tonic
* @param {Object} obj - the object to test
* @return {Boolean} true if it a key with tonic
*/
function isKey (o) { return tonalNotation.isArr(o) && isKeyMode(o[0]) }
function hasTonic (o) { return isKey(o) && o[1] }

@@ -212,4 +199,2 @@

exports.build = build;
exports.isKey = isKey;
exports.hasTonic = hasTonic;
exports.fromAlter = fromAlter;

@@ -216,0 +201,0 @@ exports.fromAcc = fromAcc;

@@ -57,17 +57,4 @@ import { parseNote, pitch, fifths } from 'tonal-pitch'

/**
* Test if a given object is a key object
* @param {Object} obj - the object to test
* @return {Boolean} true if it's a key object
* @see build
*/
export function isKey (o) {
return isArr(o) && isKeyMode(o[0])
}
/**
* Test if the given object is a key with tonic
* @param {Object} obj - the object to test
* @return {Boolean} true if it a key with tonic
*/
export function hasTonic (o) { return isKey(o) && o[1] }
function isKey (o) { return isArr(o) && isKeyMode(o[0]) }
function hasTonic (o) { return isKey(o) && o[1] }

@@ -74,0 +61,0 @@ function majorKey (n) { return build(trFifths('C', n), 'major') }

2

package.json
{
"name": "tonal-key",
"version": "0.50.0",
"version": "0.50.1",
"description": "Conversion between key numbers and note names",

@@ -5,0 +5,0 @@ "keywords": [

@@ -12,3 +12,2 @@ # tonal-key [![npm version](https://img.shields.io/npm/v/tonal-key.svg)](https://www.npmjs.com/package/tonal-key)

## API Reference
<dl>

@@ -27,8 +26,2 @@ <dt><a href="#names">names(alias)</a> ⇒ <code>Array</code></dt>

</dd>
<dt><a href="#isKey">isKey(obj)</a> ⇒ <code>Boolean</code></dt>
<dd><p>Test if a given object is a key object</p>
</dd>
<dt><a href="#hasTonic">hasTonic(obj)</a> ⇒ <code>Boolean</code></dt>
<dd><p>Test if the given object is a key with tonic</p>
</dd>
<dt><a href="#fromAlter">fromAlter(alt)</a> ⇒ <code>Key</code></dt>

@@ -112,27 +105,2 @@ <dd><p>Create a major key from alterations</p>

```
<a name="isKey"></a>
## isKey(obj) ⇒ <code>Boolean</code>
Test if a given object is a key object
**Kind**: global function
**Returns**: <code>Boolean</code> - true if it's a key object
**See**: build
| Param | Type | Description |
| --- | --- | --- |
| obj | <code>Object</code> | the object to test |
<a name="hasTonic"></a>
## hasTonic(obj) ⇒ <code>Boolean</code>
Test if the given object is a key with tonic
**Kind**: global function
**Returns**: <code>Boolean</code> - true if it a key with tonic
| Param | Type | Description |
| --- | --- | --- |
| obj | <code>Object</code> | the object to test |
<a name="fromAlter"></a>

@@ -139,0 +107,0 @@

@@ -33,9 +33,2 @@

test('isKey', function (t) {
t.ok(key.isKey(['dorian', 'F#']))
t.ok(key.isKey(['aeolian']))
t.equal(key.isKey('bah'), false)
t.end()
})
test('from alter', function (t) {

@@ -42,0 +35,0 @@ t.deepEqual([0, 1, 2, 3, 4, 5, 6, 7].map(key.fromAlter),

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