UNPKG

@tonaljs/core

Version:

Music theory library

1 lines 1.24 kB
{"version":3,"sources":["../index.ts"],"sourcesContent":["import { isNamedPitch } from \"@tonaljs/pitch\";\n\nexport * from \"@tonaljs/pitch\";\nexport * from \"@tonaljs/pitch-distance\";\nexport * from \"@tonaljs/pitch-interval\";\nexport * from \"@tonaljs/pitch-note\";\n\nexport const fillStr = (s: string, n: number) => Array(Math.abs(n) + 1).join(s);\n\nexport function deprecate<\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ResultFn extends (this: any, ...newArgs: any[]) => ReturnType<ResultFn>,\n>(original: string, alternative: string, fn: ResultFn) {\n return function (this: unknown, ...args: unknown[]): ReturnType<ResultFn> {\n // tslint:disable-next-line\n console.warn(`${original} is deprecated. Use ${alternative}.`);\n return fn.apply(this, args);\n };\n}\n\nexport const isNamed = deprecate(\"isNamed\", \"isNamedPitch\", isNamedPitch);\n"],"mappings":";AAAA,SAAS,oBAAoB;AAE7B,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAEP,IAAM,UAAU,CAAC,GAAW,MAAc,MAAM,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC;AAEvE,SAAS,UAGd,UAAkB,aAAqB,IAAc;AACrD,SAAO,YAA4B,MAAuC;AAExE,YAAQ,KAAK,GAAG,QAAQ,uBAAuB,WAAW,GAAG;AAC7D,WAAO,GAAG,MAAM,MAAM,IAAI;AAAA,EAC5B;AACF;AAEO,IAAM,UAAU,UAAU,WAAW,gBAAgB,YAAY;","names":[]}