检查对象是否定义。
langx.isDefined(obj)
Example: 判断 'isDefined' 是否定义,b 显示判断值。
<!DOCTYPE html> <html> <head> <style> </style> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.3/require.min.js"></script> <script> require.config({ baseUrl: "./", packages: [{ name: "skylark", location: "../../../src/skylark" }, ] }); </script> </head> <body> Is it a is Defined? <b></b> <script> require(["skylark/finder", "skylark/langx", "skylark/datax"], function(finder, langx, datax) { var isDefined; datax.text(finder.find("b"), langx.isDefined(isDefined)); }); </script> </body> </html>