all files / music-notation/note/ note.js

100% Statements 4/4
100% Branches 0/0
100% Functions 1/1
100% Lines 3/3
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21                                   
'use strict'
 
var parse = require('./parse')
var str = require('./str')
 
/**
 * Get a note from a string (or null if not valid note)
 *
 * @name note
 * @function
 * @param {String} src - the source
 * @return {String} the note in scientific notation
 *
 * @example
 * note = require('music-notation/note/note')
 * note('fx2') // => 'F##2'
 * note('bbb') // => 'Bbb'
 * note('blah') // => null
 */
module.exports = function (n) { return str(parse(n)) }