gyromagnetic-ratio
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -6,4 +6,4 @@ export type Nuclei = '1H' | '2H' | '3H' | '3He' | '7Li' | '13C' | '14N' | '15N' | '17O' | '19F' | '23Na' | '27Al' | '29Si' | '31P' | '57Fe' | '63Cu' | '67Zn' | '129Xe'; | ||
export declare const gyromagneticRatio: GyromagneticRatio; | ||
export declare function getGyromagneticRatio(nucleus: string): any; | ||
export declare function getGyromagneticRatio(nucleus: string): number | null; | ||
export {}; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -22,5 +22,5 @@ export const gyromagneticRatio = { | ||
export function getGyromagneticRatio(nucleus) { | ||
//@ts-expect-error we check that it is correct | ||
if (gyromagneticRatio[nucleus]) | ||
if (gyromagneticRatio[nucleus]) { | ||
return gyromagneticRatio[nucleus]; | ||
} | ||
nucleus = nucleus.toLowerCase(); | ||
@@ -34,3 +34,2 @@ if (nucleus === 'proton') | ||
for (const key in gyromagneticRatio) { | ||
//@ts-expect-error we know it is correct | ||
if (key.includes(nucleusNumber)) | ||
@@ -37,0 +36,0 @@ return gyromagneticRatio[key]; |
@@ -6,4 +6,4 @@ export type Nuclei = '1H' | '2H' | '3H' | '3He' | '7Li' | '13C' | '14N' | '15N' | '17O' | '19F' | '23Na' | '27Al' | '29Si' | '31P' | '57Fe' | '63Cu' | '67Zn' | '129Xe'; | ||
export declare const gyromagneticRatio: GyromagneticRatio; | ||
export declare function getGyromagneticRatio(nucleus: string): any; | ||
export declare function getGyromagneticRatio(nucleus: string): number | null; | ||
export {}; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -25,5 +25,5 @@ "use strict"; | ||
function getGyromagneticRatio(nucleus) { | ||
//@ts-expect-error we check that it is correct | ||
if (exports.gyromagneticRatio[nucleus]) | ||
if (exports.gyromagneticRatio[nucleus]) { | ||
return exports.gyromagneticRatio[nucleus]; | ||
} | ||
nucleus = nucleus.toLowerCase(); | ||
@@ -37,3 +37,2 @@ if (nucleus === 'proton') | ||
for (const key in exports.gyromagneticRatio) { | ||
//@ts-expect-error we know it is correct | ||
if (key.includes(nucleusNumber)) | ||
@@ -40,0 +39,0 @@ return exports.gyromagneticRatio[key]; |
{ | ||
"name": "gyromagnetic-ratio", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Reference values for gyromagnetic ratio", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -47,4 +47,5 @@ export type Nuclei = | ||
export function getGyromagneticRatio(nucleus: string) { | ||
//@ts-expect-error we check that it is correct | ||
if (gyromagneticRatio[nucleus]) return gyromagneticRatio[nucleus]; | ||
if (gyromagneticRatio[nucleus as Nuclei]) { | ||
return gyromagneticRatio[nucleus as Nuclei]; | ||
} | ||
@@ -58,4 +59,3 @@ nucleus = nucleus.toLowerCase(); | ||
for (const key in gyromagneticRatio) { | ||
//@ts-expect-error we know it is correct | ||
if (key.includes(nucleusNumber)) return gyromagneticRatio[key]; | ||
if (key.includes(nucleusNumber)) return gyromagneticRatio[key as Nuclei]; | ||
} | ||
@@ -62,0 +62,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10846
148