From a8c6a64b98d81394d986b799f168f9b877aa1524 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 24 Sep 2023 03:01:23 +0000 Subject: [PATCH] Release v0.1.0 --- .editorconfig | 5 +++++ .github/.keepalive | 1 - .github/workflows/productionize.yml | 15 --------------- CITATION.cff | 30 +++++++++++++++++++++++++++++ README.md | 15 +++++++++++++-- dist/index.d.ts | 3 +++ dist/index.js | 5 +++++ dist/index.js.map | 7 +++++++ docs/types/index.d.ts | 2 +- package.json | 30 ++++++++++++++--------------- 10 files changed, 79 insertions(+), 34 deletions(-) delete mode 100644 .github/.keepalive create mode 100644 CITATION.cff create mode 100644 dist/index.d.ts create mode 100644 dist/index.js create mode 100644 dist/index.js.map diff --git a/.editorconfig b/.editorconfig index 0fd4d6c..13e9c39 100644 --- a/.editorconfig +++ b/.editorconfig @@ -179,3 +179,8 @@ indent_size = 2 [*.gypi] indent_style = space indent_size = 2 + +# Set properties for citation files: +[*.{cff,cff.txt}] +indent_style = space +indent_size = 2 diff --git a/.github/.keepalive b/.github/.keepalive deleted file mode 100644 index c42d38f..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2023-08-01T06:02:17.360Z 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/CITATION.cff b/CITATION.cff new file mode 100644 index 0000000..2ec6fff --- /dev/null +++ b/CITATION.cff @@ -0,0 +1,30 @@ +cff-version: 1.2.0 +title: stdlib +message: >- + If you use this software, please cite it using the + metadata from this file. + +type: software + +authors: + - name: The Stdlib Authors + url: https://github.com/stdlib-js/stdlib/graphs/contributors + +repository-code: https://github.com/stdlib-js/stdlib +url: https://stdlib.io + +abstract: | + Standard library for JavaScript and Node.js. + +keywords: + - JavaScript + - Node.js + - TypeScript + - standard library + - scientific computing + - numerical computing + - statistical computing + +license: Apache-2.0 AND BSL-1.0 + +date-released: 2016 diff --git a/README.md b/README.md index 0046f92..557868b 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,17 @@ limitations under the License. --> + +
+ + About stdlib... + +

We believe in a future in which the web is a preferred environment for numerical computation. To help realize this future, we've built stdlib. stdlib is a standard library, with an emphasis on numerical and scientific computation, written in JavaScript (and C) for execution in browsers and in Node.js.

+

The library is fully decomposable, being architected in such a way that you can swap out and mix and match APIs and functionality to cater to your exact preferences and use cases.

+

When you use stdlib, you can be absolutely certain that you are using the most thorough, rigorous, well-written, studied, documented, tested, measured, and high-quality code out there.

+

To join us in bringing numerical computing to the web, get started by checking us out on GitHub, and please consider financially supporting stdlib. We greatly appreciate your continued support!

+
+ # copysignf [![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] @@ -249,8 +260,8 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. [npm-image]: http://img.shields.io/npm/v/@stdlib/math-base-special-copysignf.svg [npm-url]: https://npmjs.org/package/@stdlib/math-base-special-copysignf -[test-image]: https://github.com/stdlib-js/math-base-special-copysignf/actions/workflows/test.yml/badge.svg?branch=main -[test-url]: https://github.com/stdlib-js/math-base-special-copysignf/actions/workflows/test.yml?query=branch:main +[test-image]: https://github.com/stdlib-js/math-base-special-copysignf/actions/workflows/test.yml/badge.svg?branch=v0.1.0 +[test-url]: https://github.com/stdlib-js/math-base-special-copysignf/actions/workflows/test.yml?query=branch:v0.1.0 [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/math-base-special-copysignf/main.svg [coverage-url]: https://codecov.io/github/stdlib-js/math-base-special-copysignf?branch=main diff --git a/dist/index.d.ts b/dist/index.d.ts new file mode 100644 index 0000000..5c81960 --- /dev/null +++ b/dist/index.d.ts @@ -0,0 +1,3 @@ +/// +import copysignf from '../docs/types/index'; +export = copysignf; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js new file mode 100644 index 0000000..56ce0b1 --- /dev/null +++ b/dist/index.js @@ -0,0 +1,5 @@ +"use strict";var s=function(e,r){return function(){return r||e((r={exports:{}}).exports,r),r.exports}};var v=s(function(A,u){ +var q=require('@stdlib/constants-float32-sign-mask/dist'),n=require('@stdlib/constants-float32-abs-mask/dist'),o=require('@stdlib/number-float64-base-to-float32/dist'),t=require('@stdlib/number-float32-base-to-word/dist'),c=require('@stdlib/number-float32-base-from-word/dist');function f(e,r){var a,i;return e=o(e),r=o(r),a=t(e),a&=n,i=t(r),i&=q,a|=i,c(a)}u.exports=f +});var S=v();module.exports=S; +/** @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..d5ce524 --- /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) 2021 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 SIGN_MASK = require( '@stdlib/constants-float32-sign-mask' );\nvar ABS_MASK = require( '@stdlib/constants-float32-abs-mask' );\nvar float64ToFloat32 = require( '@stdlib/number-float64-base-to-float32' );\nvar toWord = require( '@stdlib/number-float32-base-to-word' );\nvar fromWord = require( '@stdlib/number-float32-base-from-word' );\n\n\n// MAIN //\n\n/**\n* Returns a single-precision floating-point number with the magnitude of `x` and the sign of `y`.\n*\n* @param {number} x - number from which to derive a magnitude\n* @param {number} y - number from which to derive a sign\n* @returns {number} a single-precision floating-point number\n*\n* @example\n* var z = copysignf( -3.0, 10.0 );\n* // returns 3.0\n*\n* @example\n* var z = copysignf( 3.0, -1.0 );\n* // returns -3.0\n*\n* @example\n* var z = copysignf( 1.0, -0.0 );\n* // returns -1.0\n*\n* @example\n* var z = copysignf( -3.0, -0.0 );\n* // returns -3.0\n*\n* @example\n* var z = copysignf( -0.0, 1.0 );\n* // returns 0.0\n*/\nfunction copysignf( x, y ) {\n\tvar wx;\n\tvar wy;\n\n\tx = float64ToFloat32( x );\n\ty = float64ToFloat32( y );\n\n\t// Convert `x` to an unsigned integer:\n\twx = toWord( x );\n\n\t// Turn off the sign bit of `x`:\n\twx &= ABS_MASK;\n\n\t// Convert `y` to an unsigned integer:\n\twy = toWord( y );\n\n\t// Leave only the sign bit of `y` turned on:\n\twy &= SIGN_MASK;\n\n\t// Copy the sign bit of `y` to `x`:\n\twx |= wy;\n\n\t// Return a new value having the same magnitude as `x`, but with the sign of `y`:\n\treturn fromWord( wx );\n}\n\n\n// EXPORTS //\n\nmodule.exports = copysignf;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 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* Return a single-precision floating-point number with the magnitude of `x` and the sign of `y`.\n*\n* @module @stdlib/math-base-special-copysignf\n*\n* @example\n* var copysignf = require( '@stdlib/math-base-special-copysignf' );\n*\n* var z = copysignf( -3.0, 10.0 );\n* // returns 3.0\n*\n* z = copysignf( 3.0, -1.0 );\n* // returns -3.0\n*\n* z = copysignf( 1.0, -0.0 );\n* // returns -1.0\n*\n* z = copysignf( -3.0, -0.0 );\n* // returns -3.0\n*\n* z = copysignf( -0.0, 1.0 );\n* // returns 0.0\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,EAAY,QAAS,qCAAsC,EAC3DC,EAAW,QAAS,oCAAqC,EACzDC,EAAmB,QAAS,wCAAyC,EACrEC,EAAS,QAAS,qCAAsC,EACxDC,EAAW,QAAS,uCAAwC,EAgChE,SAASC,EAAWC,EAAGC,EAAI,CAC1B,IAAIC,EACAC,EAEJ,OAAAH,EAAIJ,EAAkBI,CAAE,EACxBC,EAAIL,EAAkBK,CAAE,EAGxBC,EAAKL,EAAQG,CAAE,EAGfE,GAAMP,EAGNQ,EAAKN,EAAQI,CAAE,EAGfE,GAAMT,EAGNQ,GAAMC,EAGCL,EAAUI,CAAG,CACrB,CAKAT,EAAO,QAAUM,ICzCjB,IAAIK,EAAO,IAKX,OAAO,QAAUA", + "names": ["require_main", "__commonJSMin", "exports", "module", "SIGN_MASK", "ABS_MASK", "float64ToFloat32", "toWord", "fromWord", "copysignf", "x", "y", "wx", "wy", "main"] +} diff --git a/docs/types/index.d.ts b/docs/types/index.d.ts index e2fe76a..90acdce 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 /** * Returns a single-precision floating-point number with the magnitude of `x` and the sign of `y`. diff --git a/package.json b/package.json index 3b3ed6d..bbedaf4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@stdlib/math-base-special-copysignf", - "version": "0.0.1", + "version": "0.1.0", "description": "Return a single-precision floating-point number with the magnitude of x and the sign of y.", "license": "Apache-2.0", "author": { @@ -40,23 +40,23 @@ "url": "https://github.com/stdlib-js/stdlib/issues" }, "dependencies": { - "@stdlib/constants-float32-abs-mask": "^0.0.1", - "@stdlib/constants-float32-sign-mask": "^0.0.1", - "@stdlib/math-base-napi-binary": "^0.0.8", - "@stdlib/number-float32-base-from-word": "^0.0.6", - "@stdlib/number-float32-base-to-word": "^0.0.6", - "@stdlib/number-float64-base-to-float32": "^0.0.7", - "@stdlib/utils-library-manifest": "^0.0.8" + "@stdlib/constants-float32-abs-mask": "^0.1.0", + "@stdlib/constants-float32-sign-mask": "^0.1.0", + "@stdlib/math-base-napi-binary": "^0.1.0", + "@stdlib/number-float32-base-from-word": "^0.1.0", + "@stdlib/number-float32-base-to-word": "^0.1.0", + "@stdlib/number-float64-base-to-float32": "^0.1.0", + "@stdlib/utils-library-manifest": "^0.1.0" }, "devDependencies": { - "@stdlib/bench": "^0.0.12", - "@stdlib/constants-float32-ninf": "^0.0.7", - "@stdlib/constants-float32-pinf": "^0.0.7", - "@stdlib/math-base-assert-is-nanf": "^0.0.8", - "@stdlib/math-base-assert-is-negative-zerof": "^0.0.6", - "@stdlib/math-base-assert-is-positive-zerof": "^0.0.6", + "@stdlib/bench": "^0.1.0", + "@stdlib/constants-float32-ninf": "^0.1.0", + "@stdlib/constants-float32-pinf": "^0.1.0", + "@stdlib/math-base-assert-is-nanf": "^0.1.0", + "@stdlib/math-base-assert-is-negative-zerof": "^0.1.0", + "@stdlib/math-base-assert-is-positive-zerof": "^0.1.0", "@stdlib/random-base-randu": "^0.0.8", - "@stdlib/utils-try-require": "^0.0.7", + "@stdlib/utils-try-require": "^0.1.0", "tape": "git+https://github.com/kgryte/tape.git#fix/globby", "istanbul": "^0.4.1", "tap-min": "git+https://github.com/Planeshifter/tap-min.git"