@stdlib/dstructs-named-typed-tuple 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +177 -0
- package/NOTICE +1 -0
- package/README.md +2402 -0
- package/SECURITY.md +5 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +7 -0
- package/docs/types/index.d.ts +1529 -0
- package/lib/ascending.js +44 -0
- package/lib/contains.js +44 -0
- package/lib/from_iterator.js +48 -0
- package/lib/from_iterator_map.js +54 -0
- package/lib/has_distinct_elements.js +52 -0
- package/lib/index.js +53 -0
- package/lib/main.js +1444 -0
- package/lib/validate.js +84 -0
- package/package.json +93 -0
package/SECURITY.md
ADDED
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";var x=function(h,m){return function(){return m||h((m={exports:{}}).exports,m),m.exports}};var j=x(function(ae,_){"use strict";function Nr(h,m){var n;for(n=0;n<h.length;n++)if(h[n]===m)return!0;return!1}_.exports=Nr});var B=x(function(ue,D){"use strict";var Pr=require("@stdlib/assert-has-own-property");function Ar(h){var m,n;for(m={},n=0;n<h.length;n++){if(Pr(m,h[n]))return!1;m[h[n]]=!0}return!0}D.exports=Ar});var z=x(function(oe,J){"use strict";var Ir=require("@stdlib/assert-is-plain-object"),Y=require("@stdlib/assert-has-own-property"),G=require("@stdlib/assert-is-string").isPrimitive,Lr=require("@stdlib/array-typed-dtypes"),A=require("@stdlib/string-format"),jr=j(),Mr=Lr();function _r(h,m){if(!Ir(m))return new TypeError(A("invalid argument. Options argument must be an object. Value: `%s`.",m));if(Y(m,"dtype")){if(h.dtype=m.dtype,!G(h.dtype))return new TypeError(A("invalid option. `%s` option must be a string. Option: `%s`.","dtype",h.dtype));if(!jr(Mr,h.dtype))return new TypeError(A("invalid option. `%s` option must be a recognized data type. Option: `%s`.","dtype",h.dtype))}return Y(m,"name")&&(h.name=m.name,!G(h.name))?new TypeError(A("invalid option. `%s` option must be a string. Option: `%s`.","name",h.name)):null}J.exports=_r});var H=x(function(se,C){"use strict";function Dr(h,m){return h-m}C.exports=Dr});var K=x(function(le,W){"use strict";function Br(h){var m,n;for(m=[];n=h.next(),!n.done;)m.push(n.value);return m}W.exports=Br});var U=x(function(fe,Q){"use strict";function Yr(h,m,n,s){var c,F,V;for(c=[],V=-1;F=m.next(),!F.done;)V+=1,c.push(n.call(s,F.value,V,h[V]));return c}Q.exports=Yr});var ir=x(function(ve,tr){"use strict";var X=require("@stdlib/assert-is-string-array").primitives,Gr=require("@stdlib/assert-is-empty-array-like-object"),I=require("@stdlib/assert-is-string").isPrimitive,Z=require("@stdlib/assert-is-arraybuffer"),E=require("@stdlib/assert-is-function"),k=require("@stdlib/assert-is-integer").isPrimitive,$=require("@stdlib/assert-is-object"),Jr=require("@stdlib/assert-is-collection"),rr=require("@stdlib/assert-has-own-property"),zr=require("@stdlib/assert-has-iterator-symbol-support"),Cr=require("@stdlib/utils-properties-in"),O=require("@stdlib/array-typed"),Hr=require("@stdlib/array-int8"),Wr=require("@stdlib/array-dtype"),S=require("@stdlib/utils-define-property"),g=require("@stdlib/utils-define-nonenumerable-property"),er=require("@stdlib/utils-define-nonenumerable-read-only-accessor"),Kr=require("@stdlib/utils-define-nonenumerable-read-write-accessor"),Qr=require("@stdlib/math-base-special-floor"),L=require("@stdlib/symbol-iterator"),f=require("@stdlib/string-format"),Ur=j(),Xr=B(),Zr=z(),$r=H(),re=K(),ee=U(),te=Cr(new Hr(0)),M=zr();function P(h,m){var n,s,c,F,V;if(!X(h)&&!Gr(h))throw new TypeError(f("invalid argument. Must provide an array of strings. Value: `%s`.",h));if(!Xr(h))throw new TypeError(f("invalid argument. Field names must be distinct. Value: `%s`.",h));for(s=h.slice(),n=s.length,V=0;V<n;V++)if(Ur(te,s[V]))throw new Error(f("invalid argument. Provided field name is reserved. Name: `%s`.",s[V]));if(c={dtype:"float64",name:"tuple"},arguments.length>1&&(F=Zr(c,m),F))throw F;function y(){var l,v,d,e,p;if(d=arguments.length,d<=0?e=O(n,c.dtype):d===1?I(arguments[0])?e=O(n,arguments[0]):Z(arguments[0])?e=O(arguments[0],0,n,c.dtype):e=O(arguments[0],c.dtype):d===2?Z(arguments[0])?I(arguments[1])?e=O(arguments[0],0,n,arguments[1]):e=O(arguments[0],arguments[1],n,c.dtype):e=O(arguments[0],arguments[1]):e=O(arguments[0],arguments[1],n,arguments[2]),e.length!==n)throw new RangeError(f("invalid arguments. Arguments are incompatible with the number of tuple fields. Number of fields: `%u`. Number of data elements: `%u`.",n,e.length));for(v=Wr(e),l=[],p=0;p<n;p++)l.push(p),Kr(e,s[p],b(p),q(p));return g(e,"name",c.name),er(e,"fields",nr),er(e,"orderedFields",w),g(e,"entries",T),g(e,"every",ar),g(e,"fieldOf",ur),g(e,"filter",or),g(e,"find",sr),g(e,"findIndex",fr),g(e,"findField",lr),g(e,"forEach",vr),g(e,"ind2key",hr),g(e,"key2ind",mr),g(e,"keys",gr),g(e,"lastFieldOf",cr),g(e,"map",pr),g(e,"reduce",wr),g(e,"reduceRight",dr),g(e,"reverse",yr),g(e,"slice",br),g(e,"some",Er),g(e,"sort",Tr),g(e,"subtuple",qr),g(e,"toJSON",Vr),g(e,"toLocaleString",Sr),g(e,"toString",Or),e;function b(t){return r;function r(){return e[l[t]]}}function q(t){return r;function r(a){e[l[t]]=a}}function w(){var t,r;for(t=s.slice(),r=0;r<n;r++)t[r]=s[l[r]];return t}function T(){var t,r,a,i;if(t=this,t!==e)throw new TypeError("invalid invocation. `this` is not host tuple.");return i=-1,r={},S(r,"next",{configurable:!1,enumerable:!1,writable:!1,value:u}),S(r,"return",{configurable:!1,enumerable:!1,writable:!1,value:o}),M&&S(r,L,{configurable:!1,enumerable:!1,writable:!1,value:R}),r;function u(){return i+=1,a||i>=n?{done:!0}:{value:[i,s[l[i]],e[i]],done:!1}}function o(N){return a=!0,arguments.length?{value:N,done:!0}:{done:!0}}function R(){return t.entries()}}function ar(t,r){var a,i;if(this!==e)throw new TypeError("invalid invocation. `this` is not host tuple.");if(!E(t))throw new TypeError(f("invalid argument. First argument must be a function. Value: `%s`.",t));for(i=0;i<n;i++)if(a=t.call(r,e[i],i,s[l[i]],e),!a)return!1;return!0}function ur(t){var r;if(this!==e)throw new TypeError("invalid invocation. `this` is not host tuple.");if(arguments.length>1){if(r=arguments[0],!k(r))throw new TypeError(f("invalid argument. Second argument must be an integer. Value: `%s`.",r));if(r>=n)return;r<0&&(r=n+r,r<0&&(r=0))}else r=0;for(;r<n;r++)if(e[r]===t)return s[l[r]]}function or(t,r){var a,i,u,o;if(this!==e)throw new TypeError("invalid invocation. `this` is not host tuple.");if(!E(t))throw new TypeError(f("invalid argument. First argument must be a function. Value: `%s`.",t));for(i=[],u=[],o=0;o<n;o++)a=t.call(r,e[o],o,s[l[o]],e),a&&(u.push(s[l[o]]),i.push(e[o]));return u.length===n?y(i,v):u.length?P(u,c)(i):null}function sr(t,r){var a,i;if(this!==e)throw new TypeError("invalid invocation. `this` is not host tuple.");if(!E(t))throw new TypeError(f("invalid argument. First argument must be a function. Value: `%s`.",t));for(i=0;i<n;i++)if(a=t.call(r,e[i],i,s[l[i]],e),a)return e[i]}function lr(t,r){var a,i,u;if(this!==e)throw new TypeError("invalid invocation. `this` is not host tuple.");if(!E(t))throw new TypeError(f("invalid argument. First argument must be a function. Value: `%s`.",t));for(u=0;u<n;u++)if(i=s[l[u]],a=t.call(r,e[u],u,i,e),a)return i}function fr(t,r){var a,i;if(this!==e)throw new TypeError("invalid invocation. `this` is not host tuple.");if(!E(t))throw new TypeError(f("invalid argument. First argument must be a function. Value: `%s`.",t));for(i=0;i<n;i++)if(a=t.call(r,e[i],i,s[l[i]],e),a)return i;return-1}function vr(t,r){var a;if(this!==e)throw new TypeError("invalid invocation. `this` is not host tuple.");if(!E(t))throw new TypeError(f("invalid argument. First argument must be a function. Value: `%s`.",t));for(a=0;a<n;a++)t.call(r,e[a],a,s[l[a]],e)}function hr(t){if(this!==e)throw new TypeError("invalid invocation. `this` is not host tuple.");if(!k(t))throw new TypeError(f("invalid argument. Must provide an integer. Value: `%s`.",t));if(t<0&&(t=n+t),!(t<0||t>=n))return s[l[t]]}function mr(t){var r;if(this!==e)throw new TypeError("invalid invocation. `this` is not host tuple.");if(!I(t))throw new TypeError(f("invalid argument. First argument must be a string. Value: `%s`.",t));for(r=0;r<n;r++)if(s[l[r]]===t)return r;return-1}function gr(){var t,r,a,i;if(t=this,t!==e)throw new TypeError("invalid invocation. `this` is not host tuple.");return i=-1,r={},S(r,"next",{configurable:!1,enumerable:!1,writable:!1,value:u}),S(r,"return",{configurable:!1,enumerable:!1,writable:!1,value:o}),M&&S(r,L,{configurable:!1,enumerable:!1,writable:!1,value:R}),r;function u(){return i+=1,a||i>=n?{done:!0}:{value:[i,s[l[i]]],done:!1}}function o(N){return a=!0,arguments.length?{value:N,done:!0}:{done:!0}}function R(){return t.keys()}}function cr(t){var r;if(this!==e)throw new TypeError("invalid invocation. `this` is not host tuple.");if(arguments.length>1){if(r=arguments[1],!k(r))throw new TypeError(f("invalid argument. Second argument must be an integer. Value: `%s`.",r));if(r>=n)r=n-1;else if(r<0&&(r=n+r,r<0))return}else r=n-1;for(;r>=0;r--)if(e[r]===t)return s[l[r]]}function pr(t,r){var a,i;if(this!==e)throw new TypeError("invalid invocation. `this` is not host tuple.");if(!E(t))throw new TypeError(f("invalid argument. First argument must be a function. Value: `%s`.",t));for(a=y(v),i=0;i<n;i++)a[i]=t.call(r,e[i],i,s[l[i]],e);return a}function wr(t){var r,a;if(this!==e)throw new TypeError("invalid invocation. `this` is not host tuple.");if(!E(t))throw new TypeError(f("invalid argument. First argument must be a function. Value: `%s`.",t));for(arguments.length>1?(r=arguments[1],a=0):(r=e[0],a=1);a<n;a++)r=t(r,e[a],a,s[l[a]],e);return r}function dr(t){var r,a;if(this!==e)throw new TypeError("invalid invocation. `this` is not host tuple.");if(!E(t))throw new TypeError(f("invalid argument. First argument must be a function. Value: `%s`.",t));for(arguments.length>1?(r=arguments[1],a=n-1):(r=e[n-1],a=n-2);a>=0;a--)r=t(r,e[a],a,s[l[a]],e);return r}function yr(){var t,r,a;if(this!==e)throw new TypeError("invalid invocation. `this` is not host tuple.");for(r=0;r<Qr(n/2);r++)a=n-r-1,t=e[r],e[r]=e[a],e[a]=t;for(r=0;r<n;r++)l[r]=n-l[r]-1;return e}function br(t,r){var a,i,u,o;if(this!==e)throw new TypeError("invalid invocation. `this` is not host tuple.");if(arguments.length===0)return y(e,v);if(u=t,!k(u))throw new TypeError(f("invalid argument. First argument must be an integer. Value: `%s`.",t));if(u<0&&(u=n+u,u<0&&(u=0)),arguments.length===1)o=n;else{if(o=r,!k(o))throw new TypeError(f("invalid argument. Second argument must be an integer. Value: `%s`.",r));o<0?(o=n+o,o<0&&(o=0)):o>n&&(o=n)}for(i=[],a=[];u<o;u++)i.push(s[l[u]]),a.push(e[u]);return P(i,c)(a,v)}function Er(t,r){var a,i;if(this!==e)throw new TypeError("invalid invocation. `this` is not host tuple.");if(!E(t))throw new TypeError(f("invalid argument. First argument must be a function. Value: `%s`.",t));for(i=0;i<n;i++)if(a=t.call(r,e[i],i,s[l[i]],e),a)return!0;return!1}function Tr(t){var r,a,i,u,o,R;if(this!==e)throw new TypeError("invalid invocation. `this` is not host tuple.");if(arguments.length){if(!E(t))throw new TypeError(f("invalid argument. First argument must be a function. Value: `%s`.",t));r=t}else r=$r;for(l.sort(N),a=l.slice(),i=0;i<n;i++)if(a[i]!==i){for(R=e[i],u=i,o=a[u];o!==i;)e[u]=e[o],a[u]=u,u=o,o=a[u];e[u]=R,a[u]=u}return e;function N(Fr,xr){var kr=e[l[Fr]],Rr=e[l[xr]];return r(kr,Rr)}}function qr(t,r){var a,i,u,o;if(this!==e)throw new TypeError("invalid invocation. `this` is not host tuple.");if(arguments.length===0)return y(e.buffer,e.byteOffset,v);if(i=t,!k(i))throw new TypeError(f("invalid argument. First argument must be an integer. Value: `%s`.",t));if(i<0&&(i=n+i,i<0&&(i=0)),arguments.length===1)u=n;else{if(u=r,!k(u))throw new TypeError(f("invalid argument. Second argument must be an integer. Value: `%s`.",r));u<0?(u=n+u,u<0&&(u=0)):u>n&&(u=n)}if(u<=i)return P([],c)(e.buffer,e.byteOffset,v);for(a=[],o=i;o<u;o++)a.push(s[l[o]]);return P(a,c)(e.buffer,e.byteOffset+i*e.BYTES_PER_ELEMENT,v)}function Vr(){var t,r;if(this!==e)throw new TypeError("invalid invocation. `this` is not host tuple.");for(t={},r=0;r<n;r++)t[s[r]]=e[l[r]];return t}function Sr(t,r){var a,i,u,o;if(this!==e)throw new TypeError("invalid invocation. `this` is not host tuple.");if(arguments.length===0)a=[];else if(I(t)||X(t))a=t;else throw new TypeError(f("invalid argument. First argument must be a string or an array of strings. Value: `%s`.",t));if(arguments.length<2)u={};else if($(r))u=r;else throw new TypeError(f("invalid argument. Options argument must be an object. Value: `%s`.",r));for(i=c.name.toLocaleString(a,u)+"(",o=0;o<n;o++)i+=s[o].toLocaleString(a,u),i+="=",i+=e[l[o]].toLocaleString(a,u),o<n-1&&(i+=", ");return i+=")",i}function Or(){var t,r;if(this!==e)throw new TypeError("invalid invocation. `this` is not host tuple.");for(t=c.name+"(",r=0;r<n;r++)t+=s[r],t+="=",t+=e[l[r]],r<n-1&&(t+=", ");return t+=")",t}}function nr(){return s.slice()}return S(y,"from",{configurable:!1,enumerable:!1,writable:!1,value:function(v){var d,e,p,b,q,w,T;if(this!==y)throw new TypeError("invalid invocation. `this` is not the host tuple factory.");if(e=arguments.length,e>1){if(b=arguments[1],!E(b))throw new TypeError(f("invalid argument. Second argument must be a function. Value: `%s`.",b));e>2&&(d=arguments[2])}if(Jr(v)){if(v.length!==n)throw new RangeError(f("invalid argument. Source is incompatible with the number of tuple fields. Number of fields: `%u`. Source length: `%u`.",n,v.length));if(p=y(n,c.dtype),b)for(T=0;T<n;T++)p[T]=b.call(d,v[T],T,s[T]);else for(T=0;T<n;T++)p[T]=v[T]}else if($(v)&&M&&E(v[L])){if(w=v[L](),!E(w.next))throw new TypeError(f("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",v));b?q=ee(s,w,b,d):q=re(w),p=y(q,c.dtype)}else throw new TypeError(f("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",v));return p}}),S(y,"fromObject",{configurable:!1,enumerable:!1,writable:!1,value:function(v){var d,e,p,b,q,w;if(this!==y)throw new TypeError("invalid invocation. `this` is not the host tuple factory.");if(v===null||typeof v!="object")throw new TypeError(f("invalid argument. First argument must be an object. Value: `%s`.",v));if(e=arguments.length,e>1){if(b=arguments[1],!E(b))throw new TypeError(f("invalid argument. Second argument must be a function. Value: `%s`.",b));e>2&&(d=arguments[2])}if(p=y(n,c.dtype),b)for(w=0;w<n;w++)q=s[w],rr(v,q)&&(p[w]=b.call(d,v[q],q));else for(w=0;w<n;w++)q=s[w],rr(v,q)&&(p[w]=v[q]);return p}}),S(y,"of",{configurable:!1,enumerable:!1,writable:!1,value:function(){var v,d;if(this!==y)throw new TypeError("invalid invocation. `this` is not the host tuple factory.");if(arguments.length!==n)throw new RangeError(f("invalid invocation. Number of arguments is incompatible with the number of tuple fields. Number of fields: `%u`. Number of arguments: `%u`.",n,arguments.length));for(v=[],d=0;d<arguments.length;d++)v.push(arguments[d]);return y(v)}}),y}tr.exports=P});var ie=ir();module.exports=ie;
|
|
2
|
+
/**
|
|
3
|
+
* @license Apache-2.0
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) 2018 The Stdlib Authors.
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
* you may not use this file except in compliance with the License.
|
|
9
|
+
* You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../lib/contains.js", "../lib/has_distinct_elements.js", "../lib/validate.js", "../lib/ascending.js", "../lib/from_iterator.js", "../lib/from_iterator_map.js", "../lib/main.js", "../lib/index.js"],
|
|
4
|
+
"sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if an array contains a provided value.\n*\n* @private\n* @param {Array} arr - array\n* @param {*} v - search value\n* @returns {boolean} boolean indicating if an array contains a search value\n*/\nfunction contains( arr, v ) {\n\tvar i;\n\tfor ( i = 0; i < arr.length; i++ ) {\n\t\tif ( arr[ i ] === v ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nmodule.exports = contains;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar hasOwnProp = require( '@stdlib/assert-has-own-property' );\n\n\n// MAIN //\n\n/**\n* Tests if an array contains distinct elements.\n*\n* @private\n* @param {Array} arr - input array\n* @returns {boolean} boolean indicating if an array contains distinct elements\n*/\nfunction hasDistinctElements( arr ) {\n\tvar obj;\n\tvar i;\n\n\tobj = {};\n\tfor ( i = 0; i < arr.length; i++ ) {\n\t\tif ( hasOwnProp( obj, arr[ i ] ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tobj[ arr[i] ] = true;\n\t}\n\treturn true;\n}\n\n\n// EXPORTS //\n\nmodule.exports = hasDistinctElements;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isObject = require( '@stdlib/assert-is-plain-object' );\nvar hasOwnProp = require( '@stdlib/assert-has-own-property' );\nvar isString = require( '@stdlib/assert-is-string' ).isPrimitive;\nvar dtypes = require( '@stdlib/array-typed-dtypes' );\nvar format = require( '@stdlib/string-format' );\nvar contains = require( './contains.js' );\n\n\n// VARIABLES //\n\nvar DTYPES = dtypes();\n\n\n// MAIN //\n\n/**\n* Validates function options.\n*\n* @private\n* @param {Object} opts - destination object\n* @param {Options} options - function options\n* @param {string} [options.dtype] - default data type\n* @param {string} [options.name] - tuple name\n* @returns {(Error|null)} null or an error object\n*\n* @example\n* var opts = {};\n* var options = {\n* 'dtype': 'float64',\n* 'name': 'Complex128'\n* };\n* var err = validate( opts, options );\n* if ( err ) {\n* throw err;\n* }\n*/\nfunction validate( opts, options ) {\n\tif ( !isObject( options ) ) {\n\t\treturn new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );\n\t}\n\tif ( hasOwnProp( options, 'dtype' ) ) {\n\t\topts.dtype = options.dtype;\n\t\tif ( !isString( opts.dtype ) ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'dtype', opts.dtype ) );\n\t\t}\n\t\tif ( !contains( DTYPES, opts.dtype ) ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be a recognized data type. Option: `%s`.', 'dtype', opts.dtype ) );\n\t\t}\n\t}\n\tif ( hasOwnProp( options, 'name' ) ) {\n\t\topts.name = options.name;\n\t\tif ( !isString( opts.name ) ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'name', opts.name ) );\n\t\t}\n\t}\n\treturn null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = validate;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Specifies a sort order for ordering numeric values in ascending order.\n*\n* ## Notes\n*\n* - If `a < b`, then function returns a number less than `0`, which specifies to sort `a` to an index lower than `b`.\n* - If `a > b`, then function returns a number greater than `0`, which specifies to sort `a` to an index higher than `b`.\n* - If `a == b`, then function returns `0`, which specifies that the order of `a` and `b` should remain unchanged (not guaranteed).\n*\n* @private\n* @param {number} a - first value\n* @param {number} b - second value\n* @returns {number} difference between `a` and `b`\n*/\nfunction ascending( a, b ) {\n\treturn a - b;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ascending;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {Array} output array\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tout.push( v.value );\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = fromIterator;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {StringArray} fields - tuple fields\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {Array} output array\n*/\nfunction fromIteratorMap( fields, it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tout.push( clbk.call( thisArg, v.value, i, fields[ i ] ) );\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = fromIteratorMap;\n", "/* eslint-disable max-len, max-lines */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isStringArray = require( '@stdlib/assert-is-string-array' ).primitives;\nvar isEmptyArrayLikeObject = require( '@stdlib/assert-is-empty-array-like-object' );\nvar isString = require( '@stdlib/assert-is-string' ).isPrimitive;\nvar isArrayBuffer = require( '@stdlib/assert-is-arraybuffer' );\nvar isFunction = require( '@stdlib/assert-is-function' );\nvar isInteger = require( '@stdlib/assert-is-integer' ).isPrimitive;\nvar isObject = require( '@stdlib/assert-is-object' );\nvar isCollection = require( '@stdlib/assert-is-collection' );\nvar hasOwnProp = require( '@stdlib/assert-has-own-property' );\nvar hasIteratorSymbolSupport = require( '@stdlib/assert-has-iterator-symbol-support' );\nvar propertiesIn = require( '@stdlib/utils-properties-in' );\nvar typedarray = require( '@stdlib/array-typed' );\nvar Int8Array = require( '@stdlib/array-int8' );\nvar getDtype = require( '@stdlib/array-dtype' );\nvar defineProperty = require( '@stdlib/utils-define-property' );\nvar setNonEnumerableProperty = require( '@stdlib/utils-define-nonenumerable-property' );\nvar setNonEnumerableReadOnlyAccessor = require( '@stdlib/utils-define-nonenumerable-read-only-accessor' ); // eslint-disable-line id-length\nvar setNonEnumerableReadWriteAccessor = require( '@stdlib/utils-define-nonenumerable-read-write-accessor' ); // eslint-disable-line id-length\nvar floor = require( '@stdlib/math-base-special-floor' );\nvar ITERATOR_SYMBOL = require( '@stdlib/symbol-iterator' );\nvar format = require( '@stdlib/string-format' );\nvar contains = require( './contains.js' );\nvar hasDistinctElements = require( './has_distinct_elements.js' );\nvar validate = require( './validate.js' );\nvar ascending = require( './ascending.js' );\nvar fromIterator = require( './from_iterator.js' );\nvar fromIteratorMap = require( './from_iterator_map.js' );\n\n\n// VARIABLES //\n\nvar RESERVED_PROPS = propertiesIn( new Int8Array( 0 ) );\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// MAIN //\n\n/**\n* Returns a named typed tuple factory.\n*\n* @param {StringArray} names - field (property) names\n* @param {Options} [options] - options\n* @param {string} [options.dtype=\"float64\"] - default data type\n* @param {string} [options.name=\"tuple\"] - tuple name\n* @throws {TypeError} must provide an array of strings\n* @throws {TypeError} must provide distinct field names\n* @throws {Error} cannot provide a reserved field (property) name\n* @throws {TypeError} must provide valid options\n* @throws {Error} must provide a recognized data type\n* @returns {Function} factory function\n*\n* @example\n* var point = factory( [ 'x', 'y' ] );\n*\n* var p = point( [ 1.0, -1.0 ] );\n*\n* var x = p[ 0 ];\n* // returns 1.0\n*\n* x = p.x;\n* // returns 1.0\n*\n* var y = p[ 1 ];\n* // returns -1.0\n*\n* y = p.y;\n* // returns -1.0\n*/\nfunction factory( names, options ) { // eslint-disable-line max-lines-per-function, stdlib/jsdoc-require-throws-tags\n\tvar nfields;\n\tvar fields;\n\tvar opts;\n\tvar err;\n\tvar i;\n\tif ( !isStringArray( names ) && !isEmptyArrayLikeObject( names ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an array of strings. Value: `%s`.', names ) );\n\t}\n\tif ( !hasDistinctElements( names ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Field names must be distinct. Value: `%s`.', names ) );\n\t}\n\tfields = names.slice();\n\tnfields = fields.length;\n\tfor ( i = 0; i < nfields; i++ ) {\n\t\tif ( contains( RESERVED_PROPS, fields[ i ] ) ) {\n\t\t\tthrow new Error( format( 'invalid argument. Provided field name is reserved. Name: `%s`.', fields[ i ] ) );\n\t\t}\n\t}\n\topts = {\n\t\t'dtype': 'float64',\n\t\t'name': 'tuple'\n\t};\n\tif ( arguments.length > 1 ) {\n\t\terr = validate( opts, options );\n\t\tif ( err ) {\n\t\t\tthrow err;\n\t\t}\n\t}\n\n\t/**\n\t* Returns a named typed tuple.\n\t*\n\t* @private\n\t* @param {(TypedArray|ArrayLikeObject|ArrayBuffer|Iterable)} [arg] - a typed array, array-like object, buffer, or an iterable\n\t* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n\t* @param {string} [dtype] - data type\n\t* @throws {TypeError} must provide a recognized data type\n\t* @throws {RangeError} arguments must be compatible with tuple length\n\t* @returns {TypedArray} named typed tuple\n\t*/\n\tfunction namedtypedtuple() { // eslint-disable-line max-lines-per-function\n\t\tvar indices;\n\t\tvar dtype;\n\t\tvar nargs;\n\t\tvar tuple;\n\t\tvar i;\n\n\t\tnargs = arguments.length;\n\t\tif ( nargs <= 0 ) {\n\t\t\ttuple = typedarray( nfields, opts.dtype );\n\t\t} else if ( nargs === 1 ) {\n\t\t\tif ( isString( arguments[ 0 ] ) ) {\n\t\t\t\t// Arguments: [ dtype ]\n\t\t\t\ttuple = typedarray( nfields, arguments[ 0 ] );\n\t\t\t} else if ( isArrayBuffer( arguments[ 0 ] ) ) {\n\t\t\t\t// Arguments: [ ArrayBuffer ]\n\t\t\t\ttuple = typedarray( arguments[ 0 ], 0, nfields, opts.dtype );\n\t\t\t} else {\n\t\t\t\t// Arguments: [ TypedArray|ArrayLikeObject|Iterable ]\n\t\t\t\ttuple = typedarray( arguments[ 0 ], opts.dtype );\n\t\t\t}\n\t\t} else if ( nargs === 2 ) {\n\t\t\tif ( isArrayBuffer( arguments[ 0 ] ) ) {\n\t\t\t\tif ( isString( arguments[ 1 ] ) ) {\n\t\t\t\t\t// Arguments: [ ArrayBuffer, dtype ]\n\t\t\t\t\ttuple = typedarray( arguments[ 0 ], 0, nfields, arguments[ 1 ] );\n\t\t\t\t} else {\n\t\t\t\t\t// Arguments: [ ArrayBuffer, byteOffset ]\n\t\t\t\t\ttuple = typedarray( arguments[ 0 ], arguments[ 1 ], nfields, opts.dtype );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Arguments: [ TypedArray|ArrayLikeObject|Iterable, dtype ]\n\t\t\t\ttuple = typedarray( arguments[ 0 ], arguments[ 1 ] );\n\t\t\t}\n\t\t} else {\n\t\t\t// Arguments: [ ArrayBuffer, byteOffset, dtype ]\n\t\t\ttuple = typedarray( arguments[ 0 ], arguments[ 1 ], nfields, arguments[ 2 ] );\n\t\t}\n\t\tif ( tuple.length !== nfields ) {\n\t\t\tthrow new RangeError( format( 'invalid arguments. Arguments are incompatible with the number of tuple fields. Number of fields: `%u`. Number of data elements: `%u`.', nfields, tuple.length ) );\n\t\t}\n\t\tdtype = getDtype( tuple );\n\n\t\tindices = []; // indirect index look-up table\n\t\tfor ( i = 0; i < nfields; i++ ) {\n\t\t\tindices.push( i );\n\t\t\tsetNonEnumerableReadWriteAccessor( tuple, fields[ i ], getter( i ), setter( i ) );\n\t\t}\n\t\tsetNonEnumerableProperty( tuple, 'name', opts.name );\n\t\tsetNonEnumerableReadOnlyAccessor( tuple, 'fields', getFields );\n\t\tsetNonEnumerableReadOnlyAccessor( tuple, 'orderedFields', orderedFields );\n\n\t\t// Note: keep in alphabetical order\n\t\tsetNonEnumerableProperty( tuple, 'entries', entries );\n\t\tsetNonEnumerableProperty( tuple, 'every', every );\n\t\tsetNonEnumerableProperty( tuple, 'fieldOf', fieldOf );\n\t\tsetNonEnumerableProperty( tuple, 'filter', filter );\n\t\tsetNonEnumerableProperty( tuple, 'find', find );\n\t\tsetNonEnumerableProperty( tuple, 'findIndex', findIndex );\n\t\tsetNonEnumerableProperty( tuple, 'findField', findField );\n\t\tsetNonEnumerableProperty( tuple, 'forEach', forEach );\n\t\tsetNonEnumerableProperty( tuple, 'ind2key', ind2key );\n\t\tsetNonEnumerableProperty( tuple, 'key2ind', key2ind );\n\t\tsetNonEnumerableProperty( tuple, 'keys', keys );\n\t\tsetNonEnumerableProperty( tuple, 'lastFieldOf', lastFieldOf );\n\t\tsetNonEnumerableProperty( tuple, 'map', map );\n\t\tsetNonEnumerableProperty( tuple, 'reduce', reduce );\n\t\tsetNonEnumerableProperty( tuple, 'reduceRight', reduceRight );\n\t\tsetNonEnumerableProperty( tuple, 'reverse', reverse );\n\t\tsetNonEnumerableProperty( tuple, 'slice', slice );\n\t\tsetNonEnumerableProperty( tuple, 'some', some );\n\t\tsetNonEnumerableProperty( tuple, 'sort', sort );\n\t\tsetNonEnumerableProperty( tuple, 'subtuple', subtuple );\n\t\tsetNonEnumerableProperty( tuple, 'toJSON', toJSON );\n\t\tsetNonEnumerableProperty( tuple, 'toLocaleString', toLocaleString );\n\t\tsetNonEnumerableProperty( tuple, 'toString', toString );\n\n\t\treturn tuple;\n\n\t\t/**\n\t\t* Returns an accessor to retrieve a tuple value.\n\t\t*\n\t\t* @private\n\t\t* @param {NonNegativeInteger} i - tuple index\n\t\t* @returns {Function} accessor\n\t\t*/\n\t\tfunction getter( i ) {\n\t\t\treturn get;\n\n\t\t\t/**\n\t\t\t* Returns a tuple value.\n\t\t\t*\n\t\t\t* @private\n\t\t\t* @returns {number} tuple value\n\t\t\t*/\n\t\t\tfunction get() {\n\t\t\t\treturn tuple[ indices[ i ] ];\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t* Returns an accessor to set a tuple value.\n\t\t*\n\t\t* @private\n\t\t* @param {NonNegativeInteger} i - tuple index\n\t\t* @returns {Function} accessor\n\t\t*/\n\t\tfunction setter( i ) {\n\t\t\treturn set;\n\n\t\t\t/**\n\t\t\t* Sets a tuple value.\n\t\t\t*\n\t\t\t* @private\n\t\t\t* @param {number} v - value to set\n\t\t\t*/\n\t\t\tfunction set( v ) {\n\t\t\t\ttuple[ indices[ i ] ] = v;\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t* Returns the list of tuple fields in index order.\n\t\t*\n\t\t* @private\n\t\t* @memberof tuple\n\t\t* @returns {StringArray} tuple fields\n\t\t*/\n\t\tfunction orderedFields() {\n\t\t\tvar out;\n\t\t\tvar i;\n\t\t\tout = fields.slice();\n\t\t\tfor ( i = 0; i < nfields; i++ ) {\n\t\t\t\tout[ i ] = fields[ indices[i] ];\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\n\t\t// Note: keep functions which follow in alphabetical order\n\n\t\t/**\n\t\t* Returns an iterator for iterating over tuple key-value pairs.\n\t\t*\n\t\t* @private\n\t\t* @memberof tuple\n\t\t* @throws {TypeError} `this` must be the host tuple\n\t\t* @returns {Iterator} iterator\n\t\t*/\n\t\tfunction entries() {\n\t\t\tvar self;\n\t\t\tvar iter;\n\t\t\tvar FLG;\n\t\t\tvar i;\n\n\t\t\tself = this; // eslint-disable-line no-invalid-this\n\t\t\tif ( self !== tuple ) {\n\t\t\t\tthrow new TypeError( 'invalid invocation. `this` is not host tuple.' );\n\t\t\t}\n\n\t\t\t// Initialize the iteration index:\n\t\t\ti = -1;\n\n\t\t\t// Create an iterator protocol-compliant object:\n\t\t\titer = {};\n\t\t\tdefineProperty( iter, 'next', {\n\t\t\t\t'configurable': false,\n\t\t\t\t'enumerable': false,\n\t\t\t\t'writable': false,\n\t\t\t\t'value': next\n\t\t\t});\n\t\t\tdefineProperty( iter, 'return', {\n\t\t\t\t'configurable': false,\n\t\t\t\t'enumerable': false,\n\t\t\t\t'writable': false,\n\t\t\t\t'value': end\n\t\t\t});\n\t\t\tif ( HAS_ITERATOR_SYMBOL ) {\n\t\t\t\tdefineProperty( iter, ITERATOR_SYMBOL, {\n\t\t\t\t\t'configurable': false,\n\t\t\t\t\t'enumerable': false,\n\t\t\t\t\t'writable': false,\n\t\t\t\t\t'value': factory\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn iter;\n\n\t\t\t/**\n\t\t\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t\t\t*\n\t\t\t* @private\n\t\t\t* @returns {Object} iterator protocol-compliant object\n\t\t\t*/\n\t\t\tfunction next() {\n\t\t\t\ti += 1;\n\t\t\t\tif ( FLG || i >= nfields ) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t'done': true\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\t'value': [ i, fields[ indices[ i ] ], tuple[ i ] ],\n\t\t\t\t\t'done': false\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t/**\n\t\t\t* Finishes an iterator.\n\t\t\t*\n\t\t\t* @private\n\t\t\t* @param {*} [value] - value to return\n\t\t\t* @returns {Object} iterator protocol-compliant object\n\t\t\t*/\n\t\t\tfunction end( value ) {\n\t\t\t\tFLG = true;\n\t\t\t\tif ( arguments.length ) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t'value': value,\n\t\t\t\t\t\t'done': true\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\t'done': true\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t/**\n\t\t\t* Returns a new iterator.\n\t\t\t*\n\t\t\t* @private\n\t\t\t* @returns {Iterator} iterator\n\t\t\t*/\n\t\t\tfunction factory() {\n\t\t\t\treturn self.entries();\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t* Tests whether all tuple elements pass a test implemented by a predicate function.\n\t\t*\n\t\t* @private\n\t\t* @memberof tuple\n\t\t* @param {Function} predicate - predicate function\n\t\t* @param {*} [thisArg] - execution context\n\t\t* @throws {TypeError} `this` must be the host tuple\n\t\t* @throws {TypeError} first argument must be a function\n\t\t* @returns {boolean} boolean indicating if all elements pass\n\t\t*/\n\t\tfunction every( predicate, thisArg ) {\n\t\t\tvar bool;\n\t\t\tvar i;\n\t\t\tif ( this !== tuple ) { // eslint-disable-line no-invalid-this\n\t\t\t\tthrow new TypeError( 'invalid invocation. `this` is not host tuple.' );\n\t\t\t}\n\t\t\tif ( !isFunction( predicate ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t\t\t}\n\t\t\tfor ( i = 0; i < nfields; i++ ) {\n\t\t\t\tbool = predicate.call( thisArg, tuple[ i ], i, fields[ indices[i] ], tuple );\n\t\t\t\tif ( !bool ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\t/**\n\t\t* Returns the field of the first tuple element strictly equal to a search element.\n\t\t*\n\t\t* ## Notes\n\t\t*\n\t\t* - The function does not distinguish between signed and unsigned zero.\n\t\t* - If unable to locate a search element, the function returns `undefined`.\n\t\t*\n\t\t* @private\n\t\t* @memberof tuple\n\t\t* @param {*} searchElement - search element\n\t\t* @param {integer} [fromIndex=0] - tuple index from which to begin searching\n\t\t* @throws {TypeError} `this` must be the host tuple\n\t\t* @throws {TypeError} second argument must be an integer\n\t\t* @returns {(string|void)} tuple field name or `undefined`\n\t\t*/\n\t\tfunction fieldOf( searchElement ) {\n\t\t\tvar i;\n\t\t\tif ( this !== tuple ) { // eslint-disable-line no-invalid-this\n\t\t\t\tthrow new TypeError( 'invalid invocation. `this` is not host tuple.' );\n\t\t\t}\n\t\t\tif ( arguments.length > 1 ) {\n\t\t\t\ti = arguments[ 0 ];\n\t\t\t\tif ( !isInteger( i ) ) {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', i ) );\n\t\t\t\t}\n\t\t\t\tif ( i >= nfields ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif ( i < 0 ) {\n\t\t\t\t\ti = nfields + i;\n\t\t\t\t\tif ( i < 0 ) {\n\t\t\t\t\t\ti = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ti = 0;\n\t\t\t}\n\t\t\tfor ( ; i < nfields; i++ ) {\n\t\t\t\tif ( tuple[ i ] === searchElement ) {\n\t\t\t\t\treturn fields[ indices[ i ] ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t* Creates a new tuple which includes those elements for which a predicate function returns a truthy value.\n\t\t*\n\t\t* ## Notes\n\t\t*\n\t\t* - The returned tuple has the same data type as the host tuple.\n\t\t* - If a predicate function does not return a truthy value for any tuple element, the function returns `null`.\n\t\t*\n\t\t* @private\n\t\t* @memberof tuple\n\t\t* @param {Function} predicate - filter (predicate) function\n\t\t* @param {*} [thisArg] - execution context\n\t\t* @throws {TypeError} `this` must be the host tuple\n\t\t* @throws {TypeError} first argument must be a function\n\t\t* @returns {(TypedArray|null)} new tuple\n\t\t*/\n\t\tfunction filter( predicate, thisArg ) {\n\t\t\tvar bool;\n\t\t\tvar tmp;\n\t\t\tvar f;\n\t\t\tvar i;\n\t\t\tif ( this !== tuple ) { // eslint-disable-line no-invalid-this\n\t\t\t\tthrow new TypeError( 'invalid invocation. `this` is not host tuple.' );\n\t\t\t}\n\t\t\tif ( !isFunction( predicate ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t\t\t}\n\t\t\ttmp = [];\n\t\t\tf = [];\n\t\t\tfor ( i = 0; i < nfields; i++ ) {\n\t\t\t\tbool = predicate.call( thisArg, tuple[ i ], i, fields[ indices[i] ], tuple );\n\t\t\t\tif ( bool ) {\n\t\t\t\t\tf.push( fields[ indices[i] ] );\n\t\t\t\t\ttmp.push( tuple[ i ] );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( f.length === nfields ) {\n\t\t\t\treturn namedtypedtuple( tmp, dtype );\n\t\t\t}\n\t\t\tif ( f.length ) {\n\t\t\t\treturn factory( f, opts )( tmp );\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\n\t\t/**\n\t\t* Returns the first tuple element for which a provided predicate function returns a truthy value.\n\t\t*\n\t\t* @private\n\t\t* @memberof tuple\n\t\t* @param {Function} predicate - predicate function\n\t\t* @param {*} [thisArg] - execution context\n\t\t* @throws {TypeError} `this` must be the host tuple\n\t\t* @throws {TypeError} first argument must be a function\n\t\t* @returns {(number|void)} tuple element\n\t\t*/\n\t\tfunction find( predicate, thisArg ) {\n\t\t\tvar bool;\n\t\t\tvar i;\n\t\t\tif ( this !== tuple ) { // eslint-disable-line no-invalid-this\n\t\t\t\tthrow new TypeError( 'invalid invocation. `this` is not host tuple.' );\n\t\t\t}\n\t\t\tif ( !isFunction( predicate ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t\t\t}\n\t\t\tfor ( i = 0; i < nfields; i++ ) {\n\t\t\t\tbool = predicate.call( thisArg, tuple[ i ], i, fields[ indices[i] ], tuple );\n\t\t\t\tif ( bool ) {\n\t\t\t\t\treturn tuple[ i ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t* Returns the field of the first tuple element for which a provided predicate function returns a truthy value.\n\t\t*\n\t\t* ## Notes\n\t\t*\n\t\t* - If the predicate function never returns a truthy value, the function returns `undefined`.\n\t\t*\n\t\t* @private\n\t\t* @memberof tuple\n\t\t* @param {Function} predicate - predicate function\n\t\t* @param {*} [thisArg] - execution context\n\t\t* @throws {TypeError} `this` must be the host tuple\n\t\t* @throws {TypeError} first argument must be a function\n\t\t* @returns {(string|void)} tuple field name or `undefined`\n\t\t*/\n\t\tfunction findField( predicate, thisArg ) {\n\t\t\tvar bool;\n\t\t\tvar f;\n\t\t\tvar i;\n\t\t\tif ( this !== tuple ) { // eslint-disable-line no-invalid-this\n\t\t\t\tthrow new TypeError( 'invalid invocation. `this` is not host tuple.' );\n\t\t\t}\n\t\t\tif ( !isFunction( predicate ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t\t\t}\n\t\t\tfor ( i = 0; i < nfields; i++ ) {\n\t\t\t\tf = fields[ indices[ i ] ];\n\t\t\t\tbool = predicate.call( thisArg, tuple[ i ], i, f, tuple );\n\t\t\t\tif ( bool ) {\n\t\t\t\t\treturn f;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t* Returns the index of the first tuple element for which a provided predicate function returns a truthy value.\n\t\t*\n\t\t* ## Notes\n\t\t*\n\t\t* - If the predicate function never returns a truthy value, the function returns `-1`.\n\t\t*\n\t\t* @private\n\t\t* @memberof tuple\n\t\t* @param {Function} predicate - predicate function\n\t\t* @param {*} [thisArg] - execution context\n\t\t* @throws {TypeError} `this` must be the host tuple\n\t\t* @throws {TypeError} first argument must be a function\n\t\t* @returns {integer} tuple index or `-1`\n\t\t*/\n\t\tfunction findIndex( predicate, thisArg ) {\n\t\t\tvar bool;\n\t\t\tvar i;\n\t\t\tif ( this !== tuple ) { // eslint-disable-line no-invalid-this\n\t\t\t\tthrow new TypeError( 'invalid invocation. `this` is not host tuple.' );\n\t\t\t}\n\t\t\tif ( !isFunction( predicate ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t\t\t}\n\t\t\tfor ( i = 0; i < nfields; i++ ) {\n\t\t\t\tbool = predicate.call( thisArg, tuple[ i ], i, fields[ indices[i] ], tuple );\n\t\t\t\tif ( bool ) {\n\t\t\t\t\treturn i;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn -1;\n\t\t}\n\n\t\t/**\n\t\t* Invokes a callback for each tuple element.\n\t\t*\n\t\t* @private\n\t\t* @memberof tuple\n\t\t* @param {Function} fcn - function to invoke\n\t\t* @param {*} [thisArg] - execution context\n\t\t* @throws {TypeError} `this` must be the host tuple\n\t\t* @throws {TypeError} first argument must be a function\n\t\t*/\n\t\tfunction forEach( fcn, thisArg ) {\n\t\t\tvar i;\n\t\t\tif ( this !== tuple ) { // eslint-disable-line no-invalid-this\n\t\t\t\tthrow new TypeError( 'invalid invocation. `this` is not host tuple.' );\n\t\t\t}\n\t\t\tif ( !isFunction( fcn ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t\t\t}\n\t\t\tfor ( i = 0; i < nfields; i++ ) {\n\t\t\t\tfcn.call( thisArg, tuple[ i ], i, fields[ indices[i] ], tuple );\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t* Converts a tuple index to a field name.\n\t\t*\n\t\t* ## Notes\n\t\t*\n\t\t* - If provided an out-of-bounds index, the function returns `undefined`.\n\t\t* - If provided a negative tuple index, the function resolves the index relative to the last tuple element.\n\t\t*\n\t\t* @private\n\t\t* @memberof tuple\n\t\t* @param {integer} ind - tuple index\n\t\t* @throws {TypeError} `this` must be the host tuple\n\t\t* @throws {TypeError} must provide an integer\n\t\t* @returns {(string|void)} field name or undefined\n\t\t*/\n\t\tfunction ind2key( ind ) {\n\t\t\tif ( this !== tuple ) { // eslint-disable-line no-invalid-this\n\t\t\t\tthrow new TypeError( 'invalid invocation. `this` is not host tuple.' );\n\t\t\t}\n\t\t\tif ( !isInteger( ind ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide an integer. Value: `%s`.', ind ) );\n\t\t\t}\n\t\t\tif ( ind < 0 ) {\n\t\t\t\tind = nfields + ind;\n\t\t\t}\n\t\t\tif ( ind < 0 || ind >= nfields ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\treturn fields[ indices[ ind ] ];\n\t\t}\n\n\t\t/**\n\t\t* Converts a field name to a tuple index.\n\t\t*\n\t\t* ## Notes\n\t\t*\n\t\t* - If provided an unknown field name, the function returns `-1`.\n\t\t*\n\t\t* @private\n\t\t* @memberof tuple\n\t\t* @param {string} key - field name\n\t\t* @throws {TypeError} `this` must be the host tuple\n\t\t* @throws {TypeError} first argument must be a string\n\t\t* @returns {integer} tuple index\n\t\t*/\n\t\tfunction key2ind( key ) {\n\t\t\tvar i;\n\t\t\tif ( this !== tuple ) { // eslint-disable-line no-invalid-this\n\t\t\t\tthrow new TypeError( 'invalid invocation. `this` is not host tuple.' );\n\t\t\t}\n\t\t\tif ( !isString( key ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', key ) );\n\t\t\t}\n\t\t\tfor ( i = 0; i < nfields; i++ ) {\n\t\t\t\tif ( fields[ indices[i] ] === key ) {\n\t\t\t\t\treturn i;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn -1;\n\t\t}\n\n\t\t/**\n\t\t* Returns an iterator for iterating over tuple keys.\n\t\t*\n\t\t* @private\n\t\t* @memberof tuple\n\t\t* @throws {TypeError} `this` must be the host tuple\n\t\t* @returns {Iterator} iterator\n\t\t*/\n\t\tfunction keys() {\n\t\t\tvar self;\n\t\t\tvar iter;\n\t\t\tvar FLG;\n\t\t\tvar i;\n\n\t\t\tself = this; // eslint-disable-line no-invalid-this\n\t\t\tif ( self !== tuple ) {\n\t\t\t\tthrow new TypeError( 'invalid invocation. `this` is not host tuple.' );\n\t\t\t}\n\n\t\t\t// Initialize the iteration index:\n\t\t\ti = -1;\n\n\t\t\t// Create an iterator protocol-compliant object:\n\t\t\titer = {};\n\t\t\tdefineProperty( iter, 'next', {\n\t\t\t\t'configurable': false,\n\t\t\t\t'enumerable': false,\n\t\t\t\t'writable': false,\n\t\t\t\t'value': next\n\t\t\t});\n\t\t\tdefineProperty( iter, 'return', {\n\t\t\t\t'configurable': false,\n\t\t\t\t'enumerable': false,\n\t\t\t\t'writable': false,\n\t\t\t\t'value': end\n\t\t\t});\n\t\t\tif ( HAS_ITERATOR_SYMBOL ) {\n\t\t\t\tdefineProperty( iter, ITERATOR_SYMBOL, {\n\t\t\t\t\t'configurable': false,\n\t\t\t\t\t'enumerable': false,\n\t\t\t\t\t'writable': false,\n\t\t\t\t\t'value': factory\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn iter;\n\n\t\t\t/**\n\t\t\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t\t\t*\n\t\t\t* @private\n\t\t\t* @returns {Object} iterator protocol-compliant object\n\t\t\t*/\n\t\t\tfunction next() {\n\t\t\t\ti += 1;\n\t\t\t\tif ( FLG || i >= nfields ) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t'done': true\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\t'value': [ i, fields[ indices[ i ] ] ],\n\t\t\t\t\t'done': false\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t/**\n\t\t\t* Finishes an iterator.\n\t\t\t*\n\t\t\t* @private\n\t\t\t* @param {*} [value] - value to return\n\t\t\t* @returns {Object} iterator protocol-compliant object\n\t\t\t*/\n\t\t\tfunction end( value ) {\n\t\t\t\tFLG = true;\n\t\t\t\tif ( arguments.length ) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t'value': value,\n\t\t\t\t\t\t'done': true\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\t'done': true\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t/**\n\t\t\t* Returns a new iterator.\n\t\t\t*\n\t\t\t* @private\n\t\t\t* @returns {Iterator} iterator\n\t\t\t*/\n\t\t\tfunction factory() {\n\t\t\t\treturn self.keys();\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t* Returns the field of the last tuple element strictly equal to a search element, iterating from right to left.\n\t\t*\n\t\t* ## Notes\n\t\t*\n\t\t* - The function does not distinguish between signed and unsigned zero.\n\t\t* - If unable to locate a search element, the function returns `undefined`.\n\t\t*\n\t\t* @private\n\t\t* @memberof tuple\n\t\t* @param {*} searchElement - search element\n\t\t* @param {integer} [fromIndex=-1] - tuple index from which to begin searching\n\t\t* @throws {TypeError} `this` must be the host tuple\n\t\t* @throws {TypeError} second argument must be an integer\n\t\t* @returns {(string|void)} tuple field name or `undefined`\n\t\t*/\n\t\tfunction lastFieldOf( searchElement ) {\n\t\t\tvar i;\n\t\t\tif ( this !== tuple ) { // eslint-disable-line no-invalid-this\n\t\t\t\tthrow new TypeError( 'invalid invocation. `this` is not host tuple.' );\n\t\t\t}\n\t\t\tif ( arguments.length > 1 ) {\n\t\t\t\ti = arguments[ 1 ];\n\t\t\t\tif ( !isInteger( i ) ) {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', i ) );\n\t\t\t\t}\n\t\t\t\tif ( i >= nfields ) {\n\t\t\t\t\ti = nfields - 1;\n\t\t\t\t} else if ( i < 0 ) {\n\t\t\t\t\ti = nfields + i;\n\t\t\t\t\tif ( i < 0 ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ti = nfields - 1;\n\t\t\t}\n\t\t\tfor ( ; i >= 0; i-- ) {\n\t\t\t\tif ( tuple[ i ] === searchElement ) {\n\t\t\t\t\treturn fields[ indices[ i ] ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t* Maps each tuple element to an element in a new tuple.\n\t\t*\n\t\t* ## Notes\n\t\t*\n\t\t* - The returned tuple has the same data type as the host tuple.\n\t\t*\n\t\t* @private\n\t\t* @memberof tuple\n\t\t* @param {Function} fcn - map function\n\t\t* @param {*} [thisArg] - execution context\n\t\t* @throws {TypeError} `this` must be the host tuple\n\t\t* @throws {TypeError} first argument must be a function\n\t\t* @returns {TypedArray} new tuple\n\t\t*/\n\t\tfunction map( fcn, thisArg ) {\n\t\t\tvar out;\n\t\t\tvar i;\n\t\t\tif ( this !== tuple ) { // eslint-disable-line no-invalid-this\n\t\t\t\tthrow new TypeError( 'invalid invocation. `this` is not host tuple.' );\n\t\t\t}\n\t\t\tif ( !isFunction( fcn ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t\t\t}\n\t\t\tout = namedtypedtuple( dtype );\n\t\t\tfor ( i = 0; i < nfields; i++ ) {\n\t\t\t\tout[ i ] = fcn.call( thisArg, tuple[ i ], i, fields[ indices[i] ], tuple );\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\n\t\t/**\n\t\t* Applies a function against an accumulator and each element in a tuple and returns the accumulated result.\n\t\t*\n\t\t* @private\n\t\t* @memberof tuple\n\t\t* @param {Function} fcn - reduction function\n\t\t* @param {*} [initial] - initial value\n\t\t* @throws {TypeError} `this` must be the host tuple\n\t\t* @throws {TypeError} first argument must be a function\n\t\t* @returns {*} accumulated result\n\t\t*/\n\t\tfunction reduce( fcn ) {\n\t\t\tvar acc;\n\t\t\tvar i;\n\t\t\tif ( this !== tuple ) { // eslint-disable-line no-invalid-this\n\t\t\t\tthrow new TypeError( 'invalid invocation. `this` is not host tuple.' );\n\t\t\t}\n\t\t\tif ( !isFunction( fcn ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t\t\t}\n\t\t\tif ( arguments.length > 1 ) {\n\t\t\t\tacc = arguments[ 1 ];\n\t\t\t\ti = 0;\n\t\t\t} else {\n\t\t\t\tacc = tuple[ 0 ];\n\t\t\t\ti = 1;\n\t\t\t}\n\t\t\tfor ( ; i < nfields; i++ ) {\n\t\t\t\tacc = fcn( acc, tuple[ i ], i, fields[ indices[i] ], tuple );\n\t\t\t}\n\t\t\treturn acc;\n\t\t}\n\n\t\t/**\n\t\t* Applies a function against an accumulator and each element in a tuple and returns the accumulated result, iterating from right to left.\n\t\t*\n\t\t* @private\n\t\t* @memberof tuple\n\t\t* @param {Function} fcn - reduction function\n\t\t* @param {*} [initial] - initial value\n\t\t* @throws {TypeError} `this` must be the host tuple\n\t\t* @throws {TypeError} first argument must be a function\n\t\t* @returns {*} accumulated result\n\t\t*/\n\t\tfunction reduceRight( fcn ) {\n\t\t\tvar acc;\n\t\t\tvar i;\n\t\t\tif ( this !== tuple ) { // eslint-disable-line no-invalid-this\n\t\t\t\tthrow new TypeError( 'invalid invocation. `this` is not host tuple.' );\n\t\t\t}\n\t\t\tif ( !isFunction( fcn ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t\t\t}\n\t\t\tif ( arguments.length > 1 ) {\n\t\t\t\tacc = arguments[ 1 ];\n\t\t\t\ti = nfields - 1;\n\t\t\t} else {\n\t\t\t\tacc = tuple[ nfields-1 ];\n\t\t\t\ti = nfields - 2;\n\t\t\t}\n\t\t\tfor ( ; i >= 0; i-- ) {\n\t\t\t\tacc = fcn( acc, tuple[ i ], i, fields[ indices[i] ], tuple );\n\t\t\t}\n\t\t\treturn acc;\n\t\t}\n\n\t\t/**\n\t\t* Reverses a tuple **in-place**.\n\t\t*\n\t\t* @private\n\t\t* @memberof tuple\n\t\t* @throws {TypeError} `this` must be the host tuple\n\t\t* @returns {TypedArray} reversed tuple\n\t\t*/\n\t\tfunction reverse() {\n\t\t\tvar tmp;\n\t\t\tvar i;\n\t\t\tvar j;\n\t\t\tif ( this !== tuple ) { // eslint-disable-line no-invalid-this\n\t\t\t\tthrow new TypeError( 'invalid invocation. `this` is not host tuple.' );\n\t\t\t}\n\t\t\tfor ( i = 0; i < floor( nfields/2 ); i++ ) {\n\t\t\t\tj = nfields - i - 1;\n\t\t\t\ttmp = tuple[ i ];\n\t\t\t\ttuple[ i ] = tuple[ j ];\n\t\t\t\ttuple[ j ] = tmp;\n\t\t\t}\n\t\t\t// Because the indices are bounded [0,nfields), we can use simple arithmetic to \"reverse\" index values in-place...\n\t\t\tfor ( i = 0; i < nfields; i++ ) {\n\t\t\t\tindices[ i ] = nfields - indices[ i ] - 1;\n\t\t\t}\n\t\t\treturn tuple;\n\t\t}\n\n\t\t/**\n\t\t* Copies elements to a new tuple with the same underlying data type as the host tuple.\n\t\t*\n\t\t* @private\n\t\t* @memberof tuple\n\t\t* @param {integer} [begin=0] - start element index (inclusive)\n\t\t* @param {integer} [end=tuple.length] - end element index (exclusive)\n\t\t* @throws {TypeError} `this` must be the host tuple\n\t\t* @throws {TypeError} first argument must be an integer\n\t\t* @throws {TypeError} second argument must be an integer\n\t\t* @returns {TypedArray} new tuple\n\t\t*/\n\t\tfunction slice( begin, end ) {\n\t\t\tvar tmp;\n\t\t\tvar f;\n\t\t\tvar i;\n\t\t\tvar j;\n\n\t\t\tif ( this !== tuple ) { // eslint-disable-line no-invalid-this\n\t\t\t\tthrow new TypeError( 'invalid invocation. `this` is not host tuple.' );\n\t\t\t}\n\t\t\tif ( arguments.length === 0 ) {\n\t\t\t\treturn namedtypedtuple( tuple, dtype );\n\t\t\t}\n\t\t\ti = begin;\n\t\t\tif ( !isInteger( i ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', begin ) );\n\t\t\t}\n\t\t\tif ( i < 0 ) {\n\t\t\t\ti = nfields + i;\n\t\t\t\tif ( i < 0 ) {\n\t\t\t\t\ti = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( arguments.length === 1 ) {\n\t\t\t\tj = nfields;\n\t\t\t} else {\n\t\t\t\tj = end;\n\t\t\t\tif ( !isInteger( j ) ) {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t\t}\n\t\t\t\tif ( j < 0 ) {\n\t\t\t\t\tj = nfields + j;\n\t\t\t\t\tif ( j < 0 ) {\n\t\t\t\t\t\tj = 0;\n\t\t\t\t\t}\n\t\t\t\t} else if ( j > nfields ) {\n\t\t\t\t\tj = nfields;\n\t\t\t\t}\n\t\t\t}\n\t\t\tf = [];\n\t\t\ttmp = [];\n\t\t\tfor ( ; i < j; i++ ) {\n\t\t\t\tf.push( fields[ indices[i] ] );\n\t\t\t\ttmp.push( tuple[ i ] );\n\t\t\t}\n\t\t\treturn factory( f, opts )( tmp, dtype );\n\t\t}\n\n\t\t/**\n\t\t* Tests whether at least one tuple element passes a test implemented by a predicate function.\n\t\t*\n\t\t* @private\n\t\t* @memberof tuple\n\t\t* @param {Function} predicate - predicate function\n\t\t* @param {*} [thisArg] - execution context\n\t\t* @throws {TypeError} `this` must be the host tuple\n\t\t* @throws {TypeError} first argument must be a function\n\t\t* @returns {boolean} boolean indicating if at least one element passes\n\t\t*/\n\t\tfunction some( predicate, thisArg ) {\n\t\t\tvar bool;\n\t\t\tvar i;\n\t\t\tif ( this !== tuple ) { // eslint-disable-line no-invalid-this\n\t\t\t\tthrow new TypeError( 'invalid invocation. `this` is not host tuple.' );\n\t\t\t}\n\t\t\tif ( !isFunction( predicate ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t\t\t}\n\t\t\tfor ( i = 0; i < nfields; i++ ) {\n\t\t\t\tbool = predicate.call( thisArg, tuple[ i ], i, fields[ indices[i] ], tuple );\n\t\t\t\tif ( bool ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\t/**\n\t\t* Sorts a tuple in-place.\n\t\t*\n\t\t* ## Notes\n\t\t*\n\t\t* - The comparison function is provided two tuple elements, `a` and `b`, per invocation, and its return value determines the sort order as follows:\n\t\t*\n\t\t* - If the comparison function returns a value **less** than zero, then the function sorts `a` to an index lower than `b` (i.e., `a` should come **before** `b`).\n\t\t* - If the comparison function returns a value **greater** than zero, then the function sorts `a` to an index higher than `b` (i.e., `b` should come **before** `a`).\n\t\t* - If the comparison function returns **zero**, then the relative order of `a` and `b` _should_ remain unchanged.\n\t\t*\n\t\t* - Invoking this method does **not** affect tuple field assignments.\n\t\t*\n\t\t* @private\n\t\t* @memberof tuple\n\t\t* @param {Function} [compareFunction] - function which specifies the sort order\n\t\t* @throws {TypeError} `this` must be the host tuple\n\t\t* @throws {TypeError} first argument must be a function\n\t\t* @returns {TypedArray} sorted tuple\n\t\t*/\n\t\tfunction sort( compareFunction ) {\n\t\t\tvar clbk;\n\t\t\tvar tmp;\n\t\t\tvar i;\n\t\t\tvar j;\n\t\t\tvar k;\n\t\t\tvar v;\n\t\t\tif ( this !== tuple ) { // eslint-disable-line no-invalid-this\n\t\t\t\tthrow new TypeError( 'invalid invocation. `this` is not host tuple.' );\n\t\t\t}\n\t\t\tif ( arguments.length ) {\n\t\t\t\tif ( !isFunction( compareFunction ) ) {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', compareFunction ) );\n\t\t\t\t}\n\t\t\t\tclbk = compareFunction;\n\t\t\t} else {\n\t\t\t\tclbk = ascending;\n\t\t\t}\n\t\t\tindices.sort( wrapper );\n\n\t\t\t// Create a temporary indices array which we'll reorder as we rearrange the tuple elements:\n\t\t\ttmp = indices.slice();\n\n\t\t\t// Rearrange tuple elements according to the rearranged indices (note: every \"move\" moves a tuple element to its desired position with runtime complexity O(N))...\n\t\t\tfor ( i = 0; i < nfields; i++ ) {\n\t\t\t\t// Check if we need to move a tuple element:\n\t\t\t\tif ( tmp[ i ] !== i ) {\n\t\t\t\t\tv = tuple[ i ];\n\t\t\t\t\tj = i;\n\t\t\t\t\tk = tmp[ j ];\n\n\t\t\t\t\t// Follow \"cycles\", stopping once we are back at index `i`...\n\t\t\t\t\twhile ( k !== i ) {\n\t\t\t\t\t\ttuple[ j ] = tuple[ k ];\n\t\t\t\t\t\ttmp[ j ] = j;\n\t\t\t\t\t\tj = k;\n\t\t\t\t\t\tk = tmp[ j ];\n\t\t\t\t\t}\n\t\t\t\t\ttuple[ j ] = v;\n\t\t\t\t\ttmp[ j ] = j;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn tuple;\n\n\t\t\t/**\n\t\t\t* Wraps a comparison function to allow sorting the internal indices array rather than the tuple directly.\n\t\t\t*\n\t\t\t* @private\n\t\t\t* @param {NonNegativeInteger} ia - first index\n\t\t\t* @param {NonNegativeInteger} ib - second index\n\t\t\t* @returns {*} value specifying the sort order\n\t\t\t*/\n\t\t\tfunction wrapper( ia, ib ) {\n\t\t\t\tvar a = tuple[ indices[ ia ] ];\n\t\t\t\tvar b = tuple[ indices[ ib ] ];\n\t\t\t\treturn clbk( a, b );\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t* Creates a new tuple over the same underlying `ArrayBuffer` and with the same underlying data type as the host tuple.\n\t\t*\n\t\t* @private\n\t\t* @memberof tuple\n\t\t* @param {integer} [begin=0] - start element index (inclusive)\n\t\t* @param {integer} [end=tuple.length] - end element index (exclusive)\n\t\t* @throws {TypeError} `this` must be the host tuple\n\t\t* @throws {TypeError} first argument must be an integer\n\t\t* @throws {TypeError} second argument must be an integer\n\t\t* @returns {TypedArray} new tuple\n\t\t*/\n\t\tfunction subtuple( begin, end ) {\n\t\t\tvar f;\n\t\t\tvar i;\n\t\t\tvar j;\n\t\t\tvar k;\n\n\t\t\tif ( this !== tuple ) { // eslint-disable-line no-invalid-this\n\t\t\t\tthrow new TypeError( 'invalid invocation. `this` is not host tuple.' );\n\t\t\t}\n\t\t\tif ( arguments.length === 0 ) {\n\t\t\t\treturn namedtypedtuple( tuple.buffer, tuple.byteOffset, dtype );\n\t\t\t}\n\t\t\ti = begin;\n\t\t\tif ( !isInteger( i ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', begin ) );\n\t\t\t}\n\t\t\tif ( i < 0 ) {\n\t\t\t\ti = nfields + i;\n\t\t\t\tif ( i < 0 ) {\n\t\t\t\t\ti = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( arguments.length === 1 ) {\n\t\t\t\tj = nfields;\n\t\t\t} else {\n\t\t\t\tj = end;\n\t\t\t\tif ( !isInteger( j ) ) {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t\t}\n\t\t\t\tif ( j < 0 ) {\n\t\t\t\t\tj = nfields + j;\n\t\t\t\t\tif ( j < 0 ) {\n\t\t\t\t\t\tj = 0;\n\t\t\t\t\t}\n\t\t\t\t} else if ( j > nfields ) {\n\t\t\t\t\tj = nfields;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( j <= i ) {\n\t\t\t\treturn factory( [], opts )( tuple.buffer, tuple.byteOffset, dtype );\n\t\t\t}\n\t\t\tf = [];\n\t\t\tfor ( k = i; k < j; k++ ) {\n\t\t\t\tf.push( fields[ indices[k] ] );\n\t\t\t}\n\t\t\treturn factory( f, opts )( tuple.buffer, tuple.byteOffset+(i*tuple.BYTES_PER_ELEMENT), dtype );\n\t\t}\n\n\t\t/**\n\t\t* Serializes a tuple as JSON.\n\t\t*\n\t\t* @private\n\t\t* @memberof tuple\n\t\t* @throws {TypeError} `this` must be the host tuple\n\t\t* @returns {JSON} tuple JSON representation\n\t\t*/\n\t\tfunction toJSON() {\n\t\t\tvar out;\n\t\t\tvar i;\n\t\t\tif ( this !== tuple ) { // eslint-disable-line no-invalid-this\n\t\t\t\tthrow new TypeError( 'invalid invocation. `this` is not host tuple.' );\n\t\t\t}\n\t\t\tout = {};\n\t\t\tfor ( i = 0; i < nfields; i++ ) {\n\t\t\t\tout[ fields[i] ] = tuple[ indices[i] ];\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\n\t\t/**\n\t\t* Serializes a tuple as a locale-specific string.\n\t\t*\n\t\t* @private\n\t\t* @memberof tuple\n\t\t* @param {(string|Array<string>)} [locales] - locale identifier(s)\n\t\t* @param {Object} [options] - configuration options\n\t\t* @throws {TypeError} `this` must be the host tuple\n\t\t* @throws {TypeError} first argument must be a string or an array of strings\n\t\t* @throws {TypeError} options argument must be an object\n\t\t* @returns {string} string representation\n\t\t*/\n\t\tfunction toLocaleString( locales, options ) {\n\t\t\tvar loc;\n\t\t\tvar out;\n\t\t\tvar o;\n\t\t\tvar i;\n\n\t\t\tif ( this !== tuple ) { // eslint-disable-line no-invalid-this\n\t\t\t\tthrow new TypeError( 'invalid invocation. `this` is not host tuple.' );\n\t\t\t}\n\t\t\tif ( arguments.length === 0 ) {\n\t\t\t\tloc = [];\n\t\t\t} else if ( isString( locales ) || isStringArray( locales ) ) {\n\t\t\t\tloc = locales;\n\t\t\t} else {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string or an array of strings. Value: `%s`.', locales ) );\n\t\t\t}\n\t\t\tif ( arguments.length < 2 ) {\n\t\t\t\to = {};\n\t\t\t} else if ( isObject( options ) ) {\n\t\t\t\to = options;\n\t\t\t} else {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );\n\t\t\t}\n\t\t\tout = opts.name.toLocaleString( loc, o ) + '(';\n\t\t\tfor ( i = 0; i < nfields; i++ ) {\n\t\t\t\tout += fields[ i ].toLocaleString( loc, o );\n\t\t\t\tout += '=';\n\t\t\t\tout += tuple[ indices[ i ] ].toLocaleString( loc, o );\n\t\t\t\tif ( i < nfields-1 ) {\n\t\t\t\t\tout += ', ';\n\t\t\t\t}\n\t\t\t}\n\t\t\tout += ')';\n\t\t\treturn out;\n\t\t}\n\n\t\t/**\n\t\t* Serializes a tuple as a string.\n\t\t*\n\t\t* @private\n\t\t* @memberof tuple\n\t\t* @throws {TypeError} `this` must be the host tuple\n\t\t* @returns {string} tuple string representation\n\t\t*/\n\t\tfunction toString() {\n\t\t\tvar out;\n\t\t\tvar i;\n\t\t\tif ( this !== tuple ) { // eslint-disable-line no-invalid-this\n\t\t\t\tthrow new TypeError( 'invalid invocation. `this` is not host tuple.' );\n\t\t\t}\n\t\t\tout = opts.name + '(';\n\t\t\tfor ( i = 0; i < nfields; i++ ) {\n\t\t\t\tout += fields[ i ];\n\t\t\t\tout += '=';\n\t\t\t\tout += tuple[ indices[ i ] ];\n\t\t\t\tif ( i < nfields-1 ) {\n\t\t\t\t\tout += ', ';\n\t\t\t\t}\n\t\t\t}\n\t\t\tout += ')';\n\t\t\treturn out;\n\t\t}\n\t}\n\n\t/**\n\t* Returns the list of tuple fields.\n\t*\n\t* @private\n\t* @memberof tuple\n\t* @returns {StringArray} tuple fields\n\t*/\n\tfunction getFields() {\n\t\treturn fields.slice();\n\t}\n\n\t// Note: keep the following methods in alphabetical order...\n\n\t/**\n\t* Creates a new tuple from an array-like object or an iterable.\n\t*\n\t* @private\n\t* @name from\n\t* @memberof namedtypedtuple\n\t* @type {Function}\n\t* @param {(ArrayLikeObject|Iterable)} src - array-like object or iterable\n\t* @param {Function} [clbk] - callback to invoke for each source element\n\t* @param {*} [thisArg] - callback execution context\n\t* @throws {TypeError} `this` must be the host tuple factory\n\t* @throws {TypeError} first argument must be an array-like object or an iterable\n\t* @throws {RangeError} source must be compatible with tuple length\n\t* @throws {TypeError} second argument must be a function\n\t* @returns {TypedArray} new tuple\n\t*/\n\tdefineProperty( namedtypedtuple, 'from', {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'writable': false,\n\t\t'value': function from( src ) { // eslint-disable-line no-restricted-syntax\n\t\t\tvar thisArg;\n\t\t\tvar nargs;\n\t\t\tvar tuple;\n\t\t\tvar clbk;\n\t\t\tvar tmp;\n\t\t\tvar it;\n\t\t\tvar i;\n\t\t\tif ( this !== namedtypedtuple ) {\n\t\t\t\tthrow new TypeError( 'invalid invocation. `this` is not the host tuple factory.' );\n\t\t\t}\n\t\t\tnargs = arguments.length;\n\t\t\tif ( nargs > 1 ) {\n\t\t\t\tclbk = arguments[ 1 ];\n\t\t\t\tif ( !isFunction( clbk ) ) {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t\t\t}\n\t\t\t\tif ( nargs > 2 ) {\n\t\t\t\t\tthisArg = arguments[ 2 ];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( isCollection( src ) ) {\n\t\t\t\tif ( src.length !== nfields ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Source is incompatible with the number of tuple fields. Number of fields: `%u`. Source length: `%u`.', nfields, src.length ) );\n\t\t\t\t}\n\t\t\t\ttuple = namedtypedtuple( nfields, opts.dtype );\n\t\t\t\tif ( clbk ) {\n\t\t\t\t\tfor ( i = 0; i < nfields; i++ ) {\n\t\t\t\t\t\ttuple[ i ] = clbk.call( thisArg, src[ i ], i, fields[ i ] );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tfor ( i = 0; i < nfields; i++ ) {\n\t\t\t\t\t\ttuple[ i ] = src[ i ];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tit = src[ ITERATOR_SYMBOL ]();\n\t\t\t\tif ( !isFunction( it.next ) ) {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t\t\t}\n\t\t\t\tif ( clbk ) {\n\t\t\t\t\ttmp = fromIteratorMap( fields, it, clbk, thisArg );\n\t\t\t\t} else {\n\t\t\t\t\ttmp = fromIterator( it );\n\t\t\t\t}\n\t\t\t\ttuple = namedtypedtuple( tmp, opts.dtype );\n\t\t\t} else {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t\t}\n\t\t\treturn tuple;\n\t\t}\n\t});\n\n\t/**\n\t* Creates a new tuple from an object containing tuple fields.\n\t*\n\t* @private\n\t* @name fromObject\n\t* @memberof namedtypedtuple\n\t* @type {Function}\n\t* @param {Object} obj - source object\n\t* @param {Function} [clbk] - callback to invoke for each source object tuple field\n\t* @param {*} [thisArg] - callback execution context\n\t* @throws {TypeError} `this` must be the host tuple factory\n\t* @throws {TypeError} first argument must be an object\n\t* @throws {TypeError} second argument must be a function\n\t* @returns {TypedArray} new tuple\n\t*/\n\tdefineProperty( namedtypedtuple, 'fromObject', {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'writable': false,\n\t\t'value': function fromObject( obj ) { // eslint-disable-line no-restricted-syntax\n\t\t\tvar thisArg;\n\t\t\tvar nargs;\n\t\t\tvar tuple;\n\t\t\tvar clbk;\n\t\t\tvar f;\n\t\t\tvar i;\n\t\t\tif ( this !== namedtypedtuple ) {\n\t\t\t\tthrow new TypeError( 'invalid invocation. `this` is not the host tuple factory.' );\n\t\t\t}\n\t\t\tif ( obj === null || typeof obj !== 'object' ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an object. Value: `%s`.', obj ) );\n\t\t\t}\n\t\t\tnargs = arguments.length;\n\t\t\tif ( nargs > 1 ) {\n\t\t\t\tclbk = arguments[ 1 ];\n\t\t\t\tif ( !isFunction( clbk ) ) {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t\t\t}\n\t\t\t\tif ( nargs > 2 ) {\n\t\t\t\t\tthisArg = arguments[ 2 ];\n\t\t\t\t}\n\t\t\t}\n\t\t\ttuple = namedtypedtuple( nfields, opts.dtype );\n\t\t\tif ( clbk ) {\n\t\t\t\tfor ( i = 0; i < nfields; i++ ) {\n\t\t\t\t\tf = fields[ i ];\n\t\t\t\t\tif ( hasOwnProp( obj, f ) ) {\n\t\t\t\t\t\ttuple[ i ] = clbk.call( thisArg, obj[ f ], f );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( i = 0; i < nfields; i++ ) {\n\t\t\t\t\tf = fields[ i ];\n\t\t\t\t\tif ( hasOwnProp( obj, f ) ) {\n\t\t\t\t\t\ttuple[ i ] = obj[ f ];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn tuple;\n\t\t}\n\t});\n\n\t/**\n\t* Creates a new tuple from a variable number of arguments.\n\t*\n\t* @private\n\t* @name of\n\t* @memberof namedtypedtuple\n\t* @type {Function}\n\t* @param {...number} element - tuple elements\n\t* @throws {TypeError} `this` must be the host tuple factory\n\t* @throws {RangeError} incompatible number of arguments\n\t* @returns {TypedArray} new tuple\n\t*/\n\tdefineProperty( namedtypedtuple, 'of', {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'writable': false,\n\t\t'value': function of() { // eslint-disable-line no-restricted-syntax\n\t\t\tvar args;\n\t\t\tvar i;\n\t\t\tif ( this !== namedtypedtuple ) {\n\t\t\t\tthrow new TypeError( 'invalid invocation. `this` is not the host tuple factory.' );\n\t\t\t}\n\t\t\tif ( arguments.length !== nfields ) {\n\t\t\t\tthrow new RangeError( format( 'invalid invocation. Number of arguments is incompatible with the number of tuple fields. Number of fields: `%u`. Number of arguments: `%u`.', nfields, arguments.length ) );\n\t\t\t}\n\t\t\targs = [];\n\t\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\t\targs.push( arguments[ i ] );\n\t\t\t}\n\t\t\treturn namedtypedtuple( args );\n\t\t}\n\t});\n\n\treturn namedtypedtuple;\n}\n\n\n// EXPORTS //\n\nmodule.exports = factory;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Named typed tuple.\n*\n* @module @stdlib/dstructs-named-typed-tuple\n*\n* @example\n* var namedtypedtuple = require( '@stdlib/dstructs-named-typed-tuple' );\n*\n* var point = namedtypedtuple( [ 'x', 'y' ] );\n*\n* var p = point( [ 1.0, -1.0 ] );\n*\n* var x = p[ 0 ];\n* // returns 1.0\n*\n* x = p.x;\n* // returns 1.0\n*\n* var y = p[ 1 ];\n* // returns -1.0\n*\n* y = p.y;\n* // returns -1.0\n*/\n\n// MAIN //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n"],
|
|
5
|
+
"mappings": "uGAAA,IAAAA,EAAAC,EAAA,SAAAC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ASI,IACzBgD,EAAInD,EAAQG,CAAE,EACT5B,GAAYgG,EAAKpB,CAAE,IACvB3C,EAAOL,CAAE,EAAIoE,EAAKpB,CAAE,GAIvB,OAAO3C,CACR,CACD,CAAC,EAcD3B,EAAgBuB,EAAiB,KAAM,CACtC,aAAgB,GAChB,WAAc,GACd,SAAY,GACZ,MAAS,UAAc,CACtB,IAAIoE,EACArE,EACJ,GAAK,OAASC,EACb,MAAM,IAAI,UAAW,2DAA4D,EAElF,GAAK,UAAU,SAAWL,EACzB,MAAM,IAAI,WAAYZ,EAAQ,8IAA+IY,EAAS,UAAU,MAAO,CAAE,EAG1M,IADAyE,EAAO,CAAC,EACFrE,EAAI,EAAGA,EAAI,UAAU,OAAQA,IAClCqE,EAAK,KAAM,UAAWrE,CAAE,CAAE,EAE3B,OAAOC,EAAiBoE,CAAK,CAC9B,CACD,CAAC,EAEMpE,CACR,CAKAtC,GAAO,QAAU8B,ICp3CjB,IAAI6E,GAAO,KAKX,OAAO,QAAUA",
|
|
6
|
+
"names": ["require_contains", "__commonJSMin", "exports", "module", "contains", "arr", "v", "i", "require_has_distinct_elements", "__commonJSMin", "exports", "module", "hasOwnProp", "hasDistinctElements", "arr", "obj", "i", "require_validate", "__commonJSMin", "exports", "module", "isObject", "hasOwnProp", "isString", "dtypes", "format", "contains", "DTYPES", "validate", "opts", "options", "require_ascending", "__commonJSMin", "exports", "module", "ascending", "a", "b", "require_from_iterator", "__commonJSMin", "exports", "module", "fromIterator", "it", "out", "v", "require_from_iterator_map", "__commonJSMin", "exports", "module", "fromIteratorMap", "fields", "it", "clbk", "thisArg", "out", "v", "i", "require_main", "__commonJSMin", "exports", "module", "isStringArray", "isEmptyArrayLikeObject", "isString", "isArrayBuffer", "isFunction", "isInteger", "isObject", "isCollection", "hasOwnProp", "hasIteratorSymbolSupport", "propertiesIn", "typedarray", "Int8Array", "getDtype", "defineProperty", "setNonEnumerableProperty", "setNonEnumerableReadOnlyAccessor", "setNonEnumerableReadWriteAccessor", "floor", "ITERATOR_SYMBOL", "format", "contains", "hasDistinctElements", "validate", "ascending", "fromIterator", "fromIteratorMap", "RESERVED_PROPS", "HAS_ITERATOR_SYMBOL", "factory", "names", "options", "nfields", "fields", "opts", "err", "i", "namedtypedtuple", "indices", "dtype", "nargs", "tuple", "getter", "setter", "getFields", "orderedFields", "entries", "every", "fieldOf", "filter", "find", "findIndex", "findField", "forEach", "ind2key", "key2ind", "keys", "lastFieldOf", "map", "reduce", "reduceRight", "reverse", "slice", "some", "sort", "subtuple", "toJSON", "toLocaleString", "toString", "get", "set", "v", "out", "self", "iter", "FLG", "next", "end", "value", "predicate", "thisArg", "bool", "searchElement", "tmp", "f", "fcn", "ind", "key", "acc", "j", "begin", "compareFunction", "clbk", "k", "wrapper", "ia", "ib", "a", "b", "locales", "loc", "o", "src", "it", "obj", "args", "main"]
|
|
7
|
+
}
|