{"id":469,"date":"2007-06-22T22:16:23","date_gmt":"2007-06-22T13:16:23","guid":{"rendered":"http:\/\/clouds.tokyo\/blog\/?p=469"},"modified":"2017-03-02T22:26:13","modified_gmt":"2017-03-02T13:26:13","slug":"js_val_type","status":"publish","type":"post","link":"https:\/\/clouds.tokyo\/blog\/js_val_type\/","title":{"rendered":"\u3010JavaScript\u3011\u5909\u6570\u306e\u30bf\u30a4\u30d7\u304c\u5408\u3063\u3066\u3044\u308b\u304b\u8abf\u3079\u308b"},"content":{"rendered":"<p>JavaScript\u306e\u5909\u6570\u306e\u30bf\u30a4\u30d7\u304c\u60f3\u5b9a\u901a\u308a\u304b\u3069\u3046\u304b\u3092true\/false\u3067\u8fd4\u3057\u307e\u3059\u3002<\/p>\n<pre>\r\nfunction is(type, obj) {\r\n  var clas = Object.prototype.toString.call(obj).slice(8, -1);\r\n  return obj !== undefined && obj !== null && clas === type;\r\n}\r\n<\/pre>\n<p>\u4f7f\u3044\u65b9\u306f<\/p>\n<pre>\r\nvar val1 = 'ABC';\r\nif( !is('Array', val1) ) {\r\n  alert('\u914d\u5217\u3067\u306f\u3042\u308a\u307e\u305b\u3093');\r\n}\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>JavaScript\u306e\u5909\u6570\u306e\u30bf\u30a4\u30d7\u304c\u60f3\u5b9a\u901a\u308a\u304b\u3069\u3046\u304b\u3092true\/false\u3067\u8fd4\u3057\u307e\u3059\u3002 function is(type, obj) { var clas = Object.prototype.toString.call &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/clouds.tokyo\/blog\/js_val_type\/\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;\u3010JavaScript\u3011\u5909\u6570\u306e\u30bf\u30a4\u30d7\u304c\u5408\u3063\u3066\u3044\u308b\u304b\u8abf\u3079\u308b&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"_jetpack_newsletter_access":""},"categories":[2],"tags":[98,171,172],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pezW3u-7z","jetpack-related-posts":[{"id":461,"url":"https:\/\/clouds.tokyo\/blog\/js_txa_insert\/","url_meta":{"origin":469,"position":0},"title":"\u3010JavaScript\u3011\u30ab\u30fc\u30bd\u30eb\u4f4d\u7f6e\u306b\u30c6\u30ad\u30b9\u30c8\u3092\u633f\u5165","author":"yamamoto","date":"2011\u5e741\u670821\u65e5","format":false,"excerpt":"\u30c6\u30ad\u30b9\u30c8\u30a8\u30ea\u30a2\u306e\u30ab\u30fc\u30bd\u30eb\u4f4d\u7f6e\u306b\u30c6\u30ad\u30b9\u30c8\u3092\u633f\u5165\u3059\u308b\u95a2\u6570\u3067\u3059\u3002 function insert_text\u2026","rel":"","context":"\u5099\u5fd8\u9332","block_context":{"text":"\u5099\u5fd8\u9332","link":"https:\/\/clouds.tokyo\/blog\/category\/memo\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":670,"url":"https:\/\/clouds.tokyo\/blog\/jquery_ajax_abort\/","url_meta":{"origin":469,"position":1},"title":"\u3010jQuery\u3011Ajax\u306e\u975e\u540c\u671f\u901a\u4fe1\u3092\u4e2d\u65ad\u3059\u308b","author":"yamamoto","date":"2017\u5e744\u670817\u65e5","format":false,"excerpt":"jQuery\u306e$.ajax\u95a2\u6570\u3067 async: true \u306b\u3057\u3066\u975e\u540c\u671f\u901a\u4fe1\u3092\u884c\u3046\u3068\u304d\u306b\u3001\u901a\u4fe1\u3092\u4e2d\u65ad\u3059\u2026","rel":"","context":"\u5099\u5fd8\u9332","block_context":{"text":"\u5099\u5fd8\u9332","link":"https:\/\/clouds.tokyo\/blog\/category\/memo\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":472,"url":"https:\/\/clouds.tokyo\/blog\/js_bool_chk\/","url_meta":{"origin":469,"position":2},"title":"true\u304bfalse\u304b\u3092\u6b63\u78ba\u306b\u8abf\u3079\u308b","author":"yamamoto","date":"2007\u5e748\u67081\u65e5","format":false,"excerpt":"function bool (val) { if(val == undefined) { retur\u2026","rel":"","context":"\u5099\u5fd8\u9332","block_context":{"text":"\u5099\u5fd8\u9332","link":"https:\/\/clouds.tokyo\/blog\/category\/memo\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":600,"url":"https:\/\/clouds.tokyo\/blog\/js_exp\/","url_meta":{"origin":469,"position":3},"title":"\u3010JavaScript\u3011\u6b63\u898f\u8868\u73fe\u306e\u6761\u4ef6\u5f0f\u306b\u5909\u6570\u3092\u4f7f\u3046","author":"yamamoto","date":"2011\u5e747\u67088\u65e5","format":false,"excerpt":"JavaScript\u306e\u6b63\u898f\u8868\u73fe\u306f\u3001\u901a\u5e38 aaa.match(\/AAA\/) \u3067\u5224\u5b9a\u3057\u305f\u308a aaa.re\u2026","rel":"","context":"\u5099\u5fd8\u9332","block_context":{"text":"\u5099\u5fd8\u9332","link":"https:\/\/clouds.tokyo\/blog\/category\/memo\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":679,"url":"https:\/\/clouds.tokyo\/blog\/js_length\/","url_meta":{"origin":469,"position":4},"title":"\u3010JavaScript\u3011\u9023\u60f3\u914d\u5217\u3067\u3082\u914d\u5217\u3067\u3082\u8981\u7d20\u6570\u3092\u53d6\u5f97","author":"yamamoto","date":"2017\u5e744\u670819\u65e5","format":false,"excerpt":"\u914d\u5217\u306e\u8981\u7d20\u6570\u306flength\u3067\u53d6\u5f97\u3067\u304d\u307e\u3059\u304c\u3001 \u9023\u60f3\u914d\u5217\u306e\u5834\u5408\u306flength\u306f\u4f7f\u3048\u307e\u305b\u3093\u3002 \u30b9\u30de\u30fc\u30c8\u3067\u2026","rel":"","context":"\u5099\u5fd8\u9332","block_context":{"text":"\u5099\u5fd8\u9332","link":"https:\/\/clouds.tokyo\/blog\/category\/memo\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":889,"url":"https:\/\/clouds.tokyo\/blog\/js_hash_delete\/","url_meta":{"origin":469,"position":5},"title":"\u3010JavaScript\u3011\u9023\u60f3\u914d\u5217\u306e\u8981\u7d20\u3092\u524a\u9664","author":"yamamoto","date":"2017\u5e7411\u670821\u65e5","format":false,"excerpt":"var hash = {'key1' : 'val1', 'key2' : 'val2', 'key\u2026","rel":"","context":"\u5099\u5fd8\u9332","block_context":{"text":"\u5099\u5fd8\u9332","link":"https:\/\/clouds.tokyo\/blog\/category\/memo\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/clouds.tokyo\/blog\/wp-json\/wp\/v2\/posts\/469"}],"collection":[{"href":"https:\/\/clouds.tokyo\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/clouds.tokyo\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/clouds.tokyo\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/clouds.tokyo\/blog\/wp-json\/wp\/v2\/comments?post=469"}],"version-history":[{"count":2,"href":"https:\/\/clouds.tokyo\/blog\/wp-json\/wp\/v2\/posts\/469\/revisions"}],"predecessor-version":[{"id":471,"href":"https:\/\/clouds.tokyo\/blog\/wp-json\/wp\/v2\/posts\/469\/revisions\/471"}],"wp:attachment":[{"href":"https:\/\/clouds.tokyo\/blog\/wp-json\/wp\/v2\/media?parent=469"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/clouds.tokyo\/blog\/wp-json\/wp\/v2\/categories?post=469"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/clouds.tokyo\/blog\/wp-json\/wp\/v2\/tags?post=469"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}