1 line
3.2 KiB
JavaScript
1 line
3.2 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([[208],{338:function(t,s,n){"use strict";n.r(s);var a=n(46),e=Object(a.a)({},function(){var t=this,s=t.$createElement,n=t._self._c||s;return n("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[n("h1",{attrs:{id:"functions"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#functions","aria-hidden":"true"}},[t._v("#")]),t._v(" Functions")]),t._v(" "),n("p",[n("a",{attrs:{id:"isfunction"}})]),t._v(" "),n("h2",{attrs:{id:"isfunction"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#isfunction","aria-hidden":"true"}},[t._v("#")]),t._v(" isFunction")]),t._v(" "),n("p",[t._v("▸ "),n("strong",[t._v("isFunction")]),t._v("(value: "),n("em",[n("code",[t._v("any")])]),t._v("): "),n("code",[t._v("boolean")])]),t._v(" "),n("p",[n("em",[t._v("Defined in "),n("a",{attrs:{href:"https://github.com/polkadot-js/common/blob/38e1c5e/packages/util/src/is/function.ts#L19",target:"_blank",rel:"noopener noreferrer"}},[t._v("is/function.ts:19"),n("OutboundLink")],1)])]),t._v(" "),n("p",[n("em",[n("strong",[t._v("name")])]),t._v(": isFunction")]),t._v(" "),n("p",[n("em",[n("strong",[t._v("summary")])]),t._v(": Tests for a "),n("code",[t._v("function")]),t._v(".")]),t._v(" "),n("p",[n("em",[n("strong",[t._v("description")])]),t._v(": Checks to see if the input value is a JavaScript function.")]),t._v(" "),n("p",[n("em",[n("strong",[t._v("example")])]),t._v(":")]),t._v(" "),n("div",{staticClass:"language-javascript line-numbers-mode"},[n("pre",{pre:!0,attrs:{class:"language-javascript"}},[n("code",[n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" isFunction "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v("'@polkadot/util'")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("isFunction")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// => true")]),t._v("\n")])]),t._v(" "),n("div",{staticClass:"line-numbers-wrapper"},[n("span",{staticClass:"line-number"},[t._v("1")]),n("br"),n("span",{staticClass:"line-number"},[t._v("2")]),n("br"),n("span",{staticClass:"line-number"},[t._v("3")]),n("br")])]),n("p",[n("strong",[t._v("Parameters:")])]),t._v(" "),n("table",[n("thead",[n("tr",[n("th",[t._v("Name")]),t._v(" "),n("th",[t._v("Type")])])]),t._v(" "),n("tbody",[n("tr",[n("td",[t._v("value")]),t._v(" "),n("td",[n("code",[t._v("any")])])])])]),t._v(" "),n("p",[n("strong",[t._v("Returns:")]),t._v(" "),n("code",[t._v("boolean")])]),t._v(" "),n("hr")])},[],!1,null,null,null);s.default=e.exports}}]); |