From 71e2fee1b1559778df84aa3101919e9ddb995490 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 19 Aug 2023 03:13:35 +0000 Subject: [PATCH] Auto-generated commit --- .github/.keepalive | 1 - .github/workflows/productionize.yml | 15 --------------- dist/index.d.ts | 3 +++ dist/index.js | 5 +++++ dist/index.js.map | 7 +++++++ docs/types/index.d.ts | 2 +- 6 files changed, 16 insertions(+), 17 deletions(-) delete mode 100644 .github/.keepalive create mode 100644 dist/index.d.ts create mode 100644 dist/index.js create mode 100644 dist/index.js.map diff --git a/.github/.keepalive b/.github/.keepalive deleted file mode 100644 index 24a2c35..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2023-08-01T01:15:16.211Z diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml index 334eb59..91f2b93 100644 --- a/.github/workflows/productionize.yml +++ b/.github/workflows/productionize.yml @@ -82,21 +82,6 @@ jobs: id: transform-error-messages uses: stdlib-js/transform-errors-action@main - # Format error messages: - - name: 'Replace double quotes with single quotes in rewritten format string error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\( \"([a-zA-Z0-9]+)\"/Error\( format\( '\1'/g" {} \; - - # Format string literal error messages: - - name: 'Replace double quotes with single quotes in rewritten string literal error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\(\"([a-zA-Z0-9]+)\"\)/Error\( format\( '\1' \)/g" {} \; - - # Format code: - - name: 'Replace double quotes with single quotes in inserted `require` calls' - run: | - find . -name "*.js" -exec sed -E -i "s/require\( ?\"@stdlib\/error-tools-fmtprodmsg\" ?\);/require\( '@stdlib\/error-tools-fmtprodmsg' \);/g" {} \; - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - name: 'Update dependencies in package.json' run: | diff --git a/dist/index.d.ts b/dist/index.d.ts new file mode 100644 index 0000000..2208711 --- /dev/null +++ b/dist/index.d.ts @@ -0,0 +1,3 @@ +/// +import isNativeFunction from '../docs/types/index'; +export = isNativeFunction; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js new file mode 100644 index 0000000..637e162 --- /dev/null +++ b/dist/index.js @@ -0,0 +1,5 @@ +"use strict";var n=function(r,i){return function(){return i||r((i={exports:{}}).exports,i),i.exports}};var e=n(function(q,t){ +var u=require('@stdlib/assert-is-function/dist'),s=require('@stdlib/regexp-native-function/dist'),c=require('@stdlib/function-to-string/dist');function o(r){return u(r)&&s.REGEXP.test(c(r))}t.exports=o +});var a=e();module.exports=a; +/** @license Apache-2.0 */ +//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map new file mode 100644 index 0000000..f8ccdee --- /dev/null +++ b/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../lib/main.js", "../lib/index.js"], + "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// MODULES //\n\nvar isFunction = require( '@stdlib/assert-is-function' );\nvar reNativeFunction = require( '@stdlib/regexp-native-function' );\nvar function2string = require( '@stdlib/function-to-string' );\n\n\n// MAIN //\n\n/**\n* Tests if a value is a native function.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a native function\n*\n* @example\n* function beep() {\n* console.log( 'boop' );\n* }\n*\n* var bool = isNativeFunction( beep );\n* // returns false\n*\n* bool = isNativeFunction( Date );\n* // returns true\n*/\nfunction isNativeFunction( value ) {\n\treturn (\n\t\tisFunction( value ) &&\n\t\treNativeFunction.REGEXP.test( function2string( value ) )\n\t);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isNativeFunction;\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* Test if a value is a native function.\n*\n* @module @stdlib/assert-is-native-function\n*\n* @example\n* var isNativeFunction = require( '@stdlib/assert-is-native-function' );\n*\n* function beep() {\n* console.log( 'boop' );\n* }\n*\n* var bool = isNativeFunction( beep );\n* // returns false\n*\n* bool = isNativeFunction( Date );\n* // returns true\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,EAAAC,EAAA,cAsBA,IAAIC,EAAa,QAAS,4BAA6B,EACnDC,EAAmB,QAAS,gCAAiC,EAC7DC,EAAkB,QAAS,4BAA6B,EAsB5D,SAASC,EAAkBC,EAAQ,CAClC,OACCJ,EAAYI,CAAM,GAClBH,EAAiB,OAAO,KAAMC,EAAiBE,CAAM,CAAE,CAEzD,CAKAL,EAAO,QAAUI,ICfjB,IAAIE,EAAO,IAKX,OAAO,QAAUA", + "names": ["require_main", "__commonJSMin", "exports", "module", "isFunction", "reNativeFunction", "function2string", "isNativeFunction", "value", "main"] +} diff --git a/docs/types/index.d.ts b/docs/types/index.d.ts index 2d78b99..ebe0785 100644 --- a/docs/types/index.d.ts +++ b/docs/types/index.d.ts @@ -16,7 +16,7 @@ * limitations under the License. */ -// TypeScript Version: 2.0 +// TypeScript Version: 4.1 /** * Tests if a value is a native function.