supported_math_functions.tsx
1 import { md5hex } from "../../../impl/utils"; 2 import Code from "../../Code"; 3 import Output from "../../Output"; 4 5 const SupportedMathFunctionsDemo = () => { 6 return ( 7 <div> 8 <Code 9 snippet={` 10 () => { 11 const functions = Object.getOwnPropertyNames(Math).filter( 12 (property) => typeof Math[property] === "function" 13 ); 14 15 return md5hex(functions.join(",")); 16 } 17 `.trim()} 18 /> 19 20 <Output 21 generator={() => { 22 const functions = Object.getOwnPropertyNames(Math).filter( 23 // @ts-expect-error 24 (property) => typeof Math[property] === "function" 25 ); 26 27 return md5hex(functions.join(",")); 28 }} 29 /> 30 </div> 31 ); 32 }; 33 34 export default SupportedMathFunctionsDemo;