You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Licensed under the Apache License, Version 2.0 (the "License");
174
+
* you may not use this file except in compliance with the License.
175
+
* You may obtain a copy of the License at
176
+
*
177
+
* http://www.apache.org/licenses/LICENSE-2.0
178
+
*
179
+
* Unless required by applicable law or agreed to in writing, software
180
+
* distributed under the License is distributed on an "AS IS" BASIS,
181
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
182
+
* See the License for the specific language governing permissions and
183
+
* limitations under the License.
184
+
*/
185
+
186
+
'use strict';
187
+
188
+
// MODULES //
189
+
190
+
var isPositiveInteger = require( '@stdlib/assert/is-positive-integer' ).isPrimitive;
191
+
var isFunction = require( '@stdlib/assert/is-function' );
192
+
193
+
194
+
// MAIN //
195
+
196
+
/**
197
+
* Returns a boolean indicating if a value is a `struct` constructor.
198
+
*
199
+
* @private
200
+
* @param {*} value - value to test
201
+
* @returns {boolean} boolean indicating if a value is a `struct` constructor
202
+
*/
203
+
<spanclass="cstat-no" title="statement not covered" ><spanclass="fstat-no" title="function not covered" >function isStructConstructor( value ) {</span></span>
204
+
<spanclass="cstat-no" title="statement not covered" > return (</span>
205
+
<spanclass="cstat-no" title="statement not covered" > isFunction( value ) &&</span>
206
+
<spanclass="cstat-no" title="statement not covered" > isPositiveInteger( value.alignment ) &&</span>
207
+
<spanclass="cstat-no" title="statement not covered" > isPositiveInteger( value.byteLength ) &&</span>
208
+
<spanclass="cstat-no" title="statement not covered" > isFunction( value.byteLengthOf ) &&</span>
209
+
<spanclass="cstat-no" title="statement not covered" > isFunction( value.byteOffsetOf ) &&</span>
210
+
<spanclass="cstat-no" title="statement not covered" > isFunction( value.bufferOf ) &&</span>
211
+
<spanclass="cstat-no" title="statement not covered" > isFunction( value.viewOf )</span>
212
+
<spanclass="cstat-no" title="statement not covered" > );</span>
213
+
<spanclass="cstat-no" title="statement not covered" >}</span>
214
+
215
+
216
+
// EXPORTS //
217
+
218
+
module.exports = isStructConstructor;
219
+
</pre></td></tr></table></pre>
220
+
221
+
<divclass='push'></div><!-- for sticky footer -->
222
+
</div><!-- /wrapper -->
223
+
<divclass='footer quiet pad2 space-top1 center small'>
0 commit comments