rittenhop-ghost/versions/5.94.2/node_modules/@stdlib/string-base-format-interpolate/dist/index.js.map

8 lines
27 KiB
Plaintext

{
"version": 3,
"sources": ["../lib/is_number.js", "../lib/zero_pad.js", "../lib/format_integer.js", "../lib/is_string.js", "../lib/format_double.js", "../lib/space_pad.js", "../lib/main.js", "../lib/index.js"],
"sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' ); // NOTE: we inline the `isNumber.isPrimitive` function from `@stdlib/assert/is-number` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nmodule.exports = isNumber;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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// FUNCTIONS //\n\n/**\n* Tests if a string starts with a minus sign (`-`).\n*\n* @private\n* @param {string} str - input string\n* @returns {boolean} boolean indicating if a string starts with a minus sign (`-`)\n*/\nfunction startsWithMinus( str ) {\n\treturn str[ 0 ] === '-';\n}\n\n/**\n* Returns a string of `n` zeros.\n*\n* @private\n* @param {number} n - number of zeros\n* @returns {string} string of zeros\n*/\nfunction zeros( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += '0';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with zeros to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction zeroPad( str, width, right ) {\n\tvar negative = false;\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tif ( startsWithMinus( str ) ) {\n\t\tnegative = true;\n\t\tstr = str.substr( 1 );\n\t}\n\tstr = ( right ) ?\n\t\tstr + zeros( pad ) :\n\t\tzeros( pad ) + str;\n\tif ( negative ) {\n\t\tstr = '-' + str;\n\t}\n\treturn str;\n}\n\n\n// EXPORTS //\n\nmodule.exports = zeroPad;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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 isNumber = require( './is_number.js' );\nvar zeroPad = require( './zero_pad.js' );\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as an integer.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid integer\n* @returns {string} formatted token argument\n*/\nfunction formatInteger( token ) {\n\tvar base;\n\tvar out;\n\tvar i;\n\n\tswitch ( token.specifier ) {\n\tcase 'b':\n\t\t// Case: %b (binary)\n\t\tbase = 2;\n\t\tbreak;\n\tcase 'o':\n\t\t// Case: %o (octal)\n\t\tbase = 8;\n\t\tbreak;\n\tcase 'x':\n\tcase 'X':\n\t\t// Case: %x, %X (hexadecimal)\n\t\tbase = 16;\n\t\tbreak;\n\tcase 'd':\n\tcase 'i':\n\tcase 'u':\n\tdefault:\n\t\t// Case: %d, %i, %u (decimal)\n\t\tbase = 10;\n\t\tbreak;\n\t}\n\tout = token.arg;\n\ti = parseInt( out, 10 );\n\tif ( !isFinite( i ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( out ) ) {\n\t\t\tthrow new Error( 'invalid integer. Value: ' + out );\n\t\t}\n\t\ti = 0;\n\t}\n\tif ( i < 0 && ( token.specifier === 'u' || base !== 10 ) ) {\n\t\ti = 0xffffffff + i + 1;\n\t}\n\tif ( i < 0 ) {\n\t\tout = ( -i ).toString( base );\n\t\tif ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tout = '-' + out;\n\t} else {\n\t\tout = i.toString( base );\n\t\tif ( !i && !token.precision ) {\n\t\t\tout = '';\n\t\t} else if ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tif ( token.sign ) {\n\t\t\tout = token.sign + out;\n\t\t}\n\t}\n\tif ( base === 16 ) {\n\t\tif ( token.alternate ) {\n\t\t\tout = '0x' + out;\n\t\t}\n\t\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\t\tuppercase.call( out ) :\n\t\t\tlowercase.call( out );\n\t}\n\tif ( base === 8 ) {\n\t\tif ( token.alternate && out.charAt( 0 ) !== '0' ) {\n\t\t\tout = '0' + out;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = formatInteger;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nmodule.exports = isString;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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 isNumber = require( './is_number.js' );\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar abs = Math.abs; // eslint-disable-line stdlib/no-builtin-math\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\nvar replace = String.prototype.replace;\n\n\n// VARIABLES //\n\nvar RE_EXP_POS_DIGITS = /e\\+(\\d)$/;\nvar RE_EXP_NEG_DIGITS = /e-(\\d)$/;\nvar RE_ONLY_DIGITS = /^(\\d+)$/;\nvar RE_DIGITS_BEFORE_EXP = /^(\\d+)e/;\nvar RE_TRAILING_PERIOD_ZERO = /\\.0$/;\nvar RE_PERIOD_ZERO_EXP = /\\.0*e/;\nvar RE_ZERO_BEFORE_EXP = /(\\..*[^0])0*e/;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as a floating-point number.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid floating-point number\n* @returns {string} formatted token argument\n*/\nfunction formatDouble( token ) {\n\tvar digits;\n\tvar out;\n\tvar f = parseFloat( token.arg );\n\tif ( !isFinite( f ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( token.arg ) ) {\n\t\t\tthrow new Error( 'invalid floating-point number. Value: ' + out );\n\t\t}\n\t\t// Case: NaN, Infinity, or -Infinity\n\t\tf = token.arg;\n\t}\n\tswitch ( token.specifier ) {\n\tcase 'e':\n\tcase 'E':\n\t\tout = f.toExponential( token.precision );\n\t\tbreak;\n\tcase 'f':\n\tcase 'F':\n\t\tout = f.toFixed( token.precision );\n\t\tbreak;\n\tcase 'g':\n\tcase 'G':\n\t\tif ( abs( f ) < 0.0001 ) {\n\t\t\tdigits = token.precision;\n\t\t\tif ( digits > 0 ) {\n\t\t\t\tdigits -= 1;\n\t\t\t}\n\t\t\tout = f.toExponential( digits );\n\t\t} else {\n\t\t\tout = f.toPrecision( token.precision );\n\t\t}\n\t\tif ( !token.alternate ) {\n\t\t\tout = replace.call( out, RE_ZERO_BEFORE_EXP, '$1e' );\n\t\t\tout = replace.call( out, RE_PERIOD_ZERO_EXP, 'e' );\n\t\t\tout = replace.call( out, RE_TRAILING_PERIOD_ZERO, '' );\n\t\t}\n\t\tbreak;\n\tdefault:\n\t\tthrow new Error( 'invalid double notation. Value: ' + token.specifier );\n\t}\n\tout = replace.call( out, RE_EXP_POS_DIGITS, 'e+0$1' );\n\tout = replace.call( out, RE_EXP_NEG_DIGITS, 'e-0$1' );\n\tif ( token.alternate ) {\n\t\tout = replace.call( out, RE_ONLY_DIGITS, '$1.' );\n\t\tout = replace.call( out, RE_DIGITS_BEFORE_EXP, '$1.e' );\n\t}\n\tif ( f >= 0 && token.sign ) {\n\t\tout = token.sign + out;\n\t}\n\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\tuppercase.call( out ) :\n\t\tlowercase.call( out );\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = formatDouble;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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// FUNCTIONS //\n\n/**\n* Returns `n` spaces.\n*\n* @private\n* @param {number} n - number of spaces\n* @returns {string} string of spaces\n*/\nfunction spaces( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += ' ';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with spaces to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction spacePad( str, width, right ) {\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tstr = ( right ) ?\n\t\tstr + spaces( pad ) :\n\t\tspaces( pad ) + str;\n\treturn str;\n}\n\n\n// EXPORTS //\n\nmodule.exports = spacePad;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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 formatInteger = require( './format_integer.js' );\nvar isString = require( './is_string.js' );\nvar formatDouble = require( './format_double.js' );\nvar spacePad = require( './space_pad.js' );\nvar zeroPad = require( './zero_pad.js' );\n\n\n// VARIABLES //\n\nvar fromCharCode = String.fromCharCode;\nvar isArray = Array.isArray; // NOTE: We use the global `Array.isArray` function here instead of `@stdlib/assert/is-array` to avoid circular dependencies.\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating whether a value is `NaN`.\n*\n* @private\n* @param {*} value - input value\n* @returns {boolean} boolean indicating whether a value is `NaN`\n*\n* @example\n* var bool = isnan( NaN );\n* // returns true\n*\n* @example\n* var bool = isnan( 4 );\n* // returns false\n*/\nfunction isnan( value ) { // explicitly define a function here instead of `@stdlib/math/base/assert/is-nan` in order to avoid circular dependencies\n\treturn ( value !== value );\n}\n\n/**\n* Initializes token object with properties of supplied format identifier object or default values if not present.\n*\n* @private\n* @param {Object} token - format identifier object\n* @returns {Object} token object\n*/\nfunction initialize( token ) {\n\tvar out = {};\n\tout.specifier = token.specifier;\n\tout.precision = ( token.precision === void 0 ) ? 1 : token.precision;\n\tout.width = token.width;\n\tout.flags = token.flags || '';\n\tout.mapping = token.mapping;\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Generates string from a token array by interpolating values.\n*\n* @param {Array} tokens - string parts and format identifier objects\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be an array\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var tokens = [ 'beep ', { 'specifier': 's' } ];\n* var out = formatInterpolate( tokens, 'boop' );\n* // returns 'beep boop'\n*/\nfunction formatInterpolate( tokens ) {\n\tvar hasPeriod;\n\tvar flags;\n\tvar token;\n\tvar flag;\n\tvar num;\n\tvar out;\n\tvar pos;\n\tvar i;\n\tvar j;\n\n\tif ( !isArray( tokens ) ) {\n\t\tthrow new TypeError( 'invalid argument. First argument must be an array. Value: `' + tokens + '`.' );\n\t}\n\tout = '';\n\tpos = 1;\n\tfor ( i = 0; i < tokens.length; i++ ) {\n\t\ttoken = tokens[ i ];\n\t\tif ( isString( token ) ) {\n\t\t\tout += token;\n\t\t} else {\n\t\t\thasPeriod = token.precision !== void 0;\n\t\t\ttoken = initialize( token );\n\t\t\tif ( !token.specifier ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Token is missing `specifier` property. Index: `'+ i +'`. Value: `' + token + '`.' );\n\t\t\t}\n\t\t\tif ( token.mapping ) {\n\t\t\t\tpos = token.mapping;\n\t\t\t}\n\t\t\tflags = token.flags;\n\t\t\tfor ( j = 0; j < flags.length; j++ ) {\n\t\t\t\tflag = flags.charAt( j );\n\t\t\t\tswitch ( flag ) {\n\t\t\t\tcase ' ':\n\t\t\t\t\ttoken.sign = ' ';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '+':\n\t\t\t\t\ttoken.sign = '+';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '0':\n\t\t\t\t\ttoken.padZeros = flags.indexOf( '-' ) < 0; // NOTE: We use built-in `Array.prototype.indexOf` here instead of `@stdlib/assert/contains` in order to avoid circular dependencies.\n\t\t\t\t\tbreak;\n\t\t\t\tcase '#':\n\t\t\t\t\ttoken.alternate = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error( 'invalid flag: ' + flag );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( token.width === '*' ) {\n\t\t\t\ttoken.width = parseInt( arguments[ pos ], 10 );\n\t\t\t\tpos += 1;\n\t\t\t\tif ( isnan( token.width ) ) {\n\t\t\t\t\tthrow new TypeError( 'the argument for * width at position ' + pos + ' is not a number. Value: `' + token.width + '`.' );\n\t\t\t\t}\n\t\t\t\tif ( token.width < 0 ) {\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.width = -token.width;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( hasPeriod ) {\n\t\t\t\tif ( token.precision === '*' ) {\n\t\t\t\t\ttoken.precision = parseInt( arguments[ pos ], 10 );\n\t\t\t\t\tpos += 1;\n\t\t\t\t\tif ( isnan( token.precision ) ) {\n\t\t\t\t\t\tthrow new TypeError( 'the argument for * precision at position ' + pos + ' is not a number. Value: `' + token.precision + '`.' );\n\t\t\t\t\t}\n\t\t\t\t\tif ( token.precision < 0 ) {\n\t\t\t\t\t\ttoken.precision = 1;\n\t\t\t\t\t\thasPeriod = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttoken.arg = arguments[ pos ];\n\t\t\tswitch ( token.specifier ) {\n\t\t\tcase 'b':\n\t\t\tcase 'o':\n\t\t\tcase 'x':\n\t\t\tcase 'X':\n\t\t\tcase 'd':\n\t\t\tcase 'i':\n\t\t\tcase 'u':\n\t\t\t\t// Case: %b (binary), %o (octal), %x, %X (hexadecimal), %d, %i (decimal), %u (unsigned decimal)\n\t\t\t\tif ( hasPeriod ) {\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatInteger( token );\n\t\t\t\tbreak;\n\t\t\tcase 's':\n\t\t\t\t// Case: %s (string)\n\t\t\t\ttoken.maxWidth = ( hasPeriod ) ? token.precision : -1;\n\t\t\t\ttoken.arg = String( token.arg );\n\t\t\t\tbreak;\n\t\t\tcase 'c':\n\t\t\t\t// Case: %c (character)\n\t\t\t\tif ( !isnan( token.arg ) ) {\n\t\t\t\t\tnum = parseInt( token.arg, 10 );\n\t\t\t\t\tif ( num < 0 || num > 127 ) {\n\t\t\t\t\t\tthrow new Error( 'invalid character code. Value: ' + token.arg );\n\t\t\t\t\t}\n\t\t\t\t\ttoken.arg = ( isnan( num ) ) ? String( token.arg ) : fromCharCode( num ); // eslint-disable-line max-len\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'e':\n\t\t\tcase 'E':\n\t\t\tcase 'f':\n\t\t\tcase 'F':\n\t\t\tcase 'g':\n\t\t\tcase 'G':\n\t\t\t\t// Case: %e, %E (scientific notation), %f, %F (decimal floating point), %g, %G (uses the shorter of %e/E or %f/F)\n\t\t\t\tif ( !hasPeriod ) {\n\t\t\t\t\ttoken.precision = 6;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatDouble( token );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new Error( 'invalid specifier: ' + token.specifier );\n\t\t\t}\n\t\t\t// Fit argument into field width...\n\t\t\tif ( token.maxWidth >= 0 && token.arg.length > token.maxWidth ) {\n\t\t\t\ttoken.arg = token.arg.substring( 0, token.maxWidth );\n\t\t\t}\n\t\t\tif ( token.padZeros ) {\n\t\t\t\ttoken.arg = zeroPad( token.arg, token.width || token.precision, token.padRight ); // eslint-disable-line max-len\n\t\t\t} else if ( token.width ) {\n\t\t\t\ttoken.arg = spacePad( token.arg, token.width, token.padRight );\n\t\t\t}\n\t\t\tout += token.arg || '';\n\t\t\tpos += 1;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = formatInterpolate;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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* Generate string from a token array by interpolating values.\n*\n* @module @stdlib/string-base-format-interpolate\n*\n* @example\n* var formatInterpolate = require( '@stdlib/string-base-format-interpolate' );\n*\n* var tokens = ['Hello ', { 'specifier': 's' }, '!' ];\n* var out = formatInterpolate( tokens, 'World' );\n* // returns 'Hello World!'\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n"],
"mappings": "uGAAA,IAAAA,EAAAC,EAAA,SAAAC,GAAAC,EAAA,cAsCA,SAASC,EAAUC,EAAQ,CAC1B,OAAS,OAAOA,GAAU,QAC3B,CAKAF,EAAO,QAAUC,IC7CjB,IAAAE,EAAAC,EAAA,SAAAC,GAAAC,EAAA,cA6BA,SAASC,EAAiBC,EAAM,CAC/B,OAAOA,EAAK,CAAE,IAAM,GACrB,CASA,SAASC,EAAOC,EAAI,CACnB,IAAIC,EAAM,GACN,EACJ,IAAM,EAAI,EAAG,EAAID,EAAG,IACnBC,GAAO,IAER,OAAOA,CACR,CAcA,SAASC,EAASJ,EAAKK,EAAOC,EAAQ,CACrC,IAAIC,EAAW,GACXC,EAAMH,EAAQL,EAAI,OACtB,OAAKQ,EAAM,IAGNT,EAAiBC,CAAI,IACzBO,EAAW,GACXP,EAAMA,EAAI,OAAQ,CAAE,GAErBA,EAAQM,EACPN,EAAMC,EAAOO,CAAI,EACjBP,EAAOO,CAAI,EAAIR,EACXO,IACJP,EAAM,IAAMA,IAENA,CACR,CAKAF,EAAO,QAAUM,ICnFjB,IAAAK,EAAAC,EAAA,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number", "__commonJSMin", "exports", "module", "isNumber", "value", "require_zero_pad", "__commonJSMin", "exports", "module", "startsWithMinus", "str", "zeros", "n", "out", "zeroPad", "width", "right", "negative", "pad", "require_format_integer", "__commonJSMin", "exports", "module", "isNumber", "zeroPad", "lowercase", "uppercase", "formatInteger", "token", "base", "out", "i", "require_is_string", "__commonJSMin", "exports", "module", "isString", "value", "require_format_double", "__commonJSMin", "exports", "module", "isNumber", "abs", "lowercase", "uppercase", "replace", "RE_EXP_POS_DIGITS", "RE_EXP_NEG_DIGITS", "RE_ONLY_DIGITS", "RE_DIGITS_BEFORE_EXP", "RE_TRAILING_PERIOD_ZERO", "RE_PERIOD_ZERO_EXP", "RE_ZERO_BEFORE_EXP", "formatDouble", "token", "digits", "out", "f", "require_space_pad", "__commonJSMin", "exports", "module", "spaces", "n", "out", "spacePad", "str", "width", "right", "pad", "require_main", "__commonJSMin", "exports", "module", "formatInteger", "isString", "formatDouble", "spacePad", "zeroPad", "fromCharCode", "isArray", "isnan", "value", "initialize", "token", "out", "formatInterpolate", "tokens", "hasPeriod", "flags", "flag", "num", "pos", "i", "j", "main"]
}