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 6c0bb77..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2023-08-01T04:39:24.596Z diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml index 952a131..b61e587 100644 --- a/.github/workflows/productionize.yml +++ b/.github/workflows/productionize.yml @@ -81,21 +81,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 298c4a9..d0b73cc 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!

+
+ # US State Names [![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] @@ -262,8 +273,8 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. [npm-image]: http://img.shields.io/npm/v/@stdlib/datasets-us-states-names.svg [npm-url]: https://npmjs.org/package/@stdlib/datasets-us-states-names -[test-image]: https://github.com/stdlib-js/datasets-us-states-names/actions/workflows/test.yml/badge.svg?branch=main -[test-url]: https://github.com/stdlib-js/datasets-us-states-names/actions/workflows/test.yml?query=branch:main +[test-image]: https://github.com/stdlib-js/datasets-us-states-names/actions/workflows/test.yml/badge.svg?branch=v0.1.0 +[test-url]: https://github.com/stdlib-js/datasets-us-states-names/actions/workflows/test.yml?query=branch:v0.1.0 [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/datasets-us-states-names/main.svg [coverage-url]: https://codecov.io/github/stdlib-js/datasets-us-states-names?branch=main diff --git a/dist/index.d.ts b/dist/index.d.ts new file mode 100644 index 0000000..1fb4765 --- /dev/null +++ b/dist/index.d.ts @@ -0,0 +1,3 @@ +/// +import names from '../docs/types/index'; +export = names; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js new file mode 100644 index 0000000..af5e340 --- /dev/null +++ b/dist/index.js @@ -0,0 +1,5 @@ +"use strict";var s=function(r,e){return function(){return e||r((e={exports:{}}).exports,e),e.exports}};var t=s(function(f,a){ +var n=require("path").resolve,i=require('@stdlib/fs-read-json/dist').sync,o=n(__dirname,"..","data","data.json"),u={encoding:"utf8"};function v(){var r=i(o,u);if(r instanceof Error)throw r;return r}a.exports=v +});var c=t();module.exports=c; +/** @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..8234148 --- /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 resolve = require( 'path' ).resolve;\nvar readJSON = require( '@stdlib/fs-read-json' ).sync;\n\n\n// VARIABLES //\n\nvar fpath = resolve( __dirname, '..', 'data', 'data.json' );\nvar opts = {\n\t'encoding': 'utf8'\n};\n\n\n// MAIN //\n\n/**\n* Returns a list of US state names in alphabetical order.\n*\n* ## Notes\n*\n* - This function synchronously reads data from disk for each invocation. Such behavior is intentional and so is the avoidance of `require`. We assume that invocations are infrequent, and we want to avoid the `require` cache. This means that we allow data to be garbage collected and a user is responsible for explicitly caching data.\n*\n* @returns {StringArray} states\n*\n* @example\n* var data = names();\n* // returns [ 'Alabama', 'Alaska', 'Arizona', 'Arkansas', ... ]\n*/\nfunction names() {\n\tvar data = readJSON( fpath, opts );\n\tif ( data instanceof Error ) {\n\t\tthrow data;\n\t}\n\treturn data;\n}\n\n\n// EXPORTS //\n\nmodule.exports = names;\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* A list of US state names in alphabetical order.\n*\n* @module @stdlib/datasets-us-states-names\n*\n* @example\n* var names = require( '@stdlib/datasets-us-states-names' );\n*\n* var data = names();\n* // returns [ 'Alabama', 'Alaska', 'Arizona', 'Arkansas', ... ]\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,EAAU,QAAS,MAAO,EAAE,QAC5BC,EAAW,QAAS,sBAAuB,EAAE,KAK7CC,EAAQF,EAAS,UAAW,KAAM,OAAQ,WAAY,EACtDG,EAAO,CACV,SAAY,MACb,EAkBA,SAASC,GAAQ,CAChB,IAAIC,EAAOJ,EAAUC,EAAOC,CAAK,EACjC,GAAKE,aAAgB,MACpB,MAAMA,EAEP,OAAOA,CACR,CAKAN,EAAO,QAAUK,IC1BjB,IAAIE,EAAO,IAKX,OAAO,QAAUA", + "names": ["require_main", "__commonJSMin", "exports", "module", "resolve", "readJSON", "fpath", "opts", "names", "data", "main"] +} diff --git a/docs/types/index.d.ts b/docs/types/index.d.ts index 9e34842..b82dced 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 list of US state names in alphabetical order. diff --git a/package.json b/package.json index 7d1eb04..d6453b5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@stdlib/datasets-us-states-names", - "version": "0.0.8", + "version": "0.1.0", "description": "A list of US state names in alphabetical order.", "license": "Apache-2.0", "author": { @@ -42,19 +42,19 @@ "url": "https://github.com/stdlib-js/stdlib/issues" }, "dependencies": { - "@stdlib/cli-ctor": "^0.0.3", - "@stdlib/fs-read-file": "^0.0.8", - "@stdlib/fs-read-json": "^0.0.7", - "@stdlib/streams-node-stdout": "^0.0.7", - "@stdlib/utils-copy": "^0.0.7" + "@stdlib/cli-ctor": "^0.1.0", + "@stdlib/fs-read-file": "^0.1.0", + "@stdlib/fs-read-json": "^0.1.0", + "@stdlib/streams-node-stdout": "^0.1.0", + "@stdlib/utils-copy": "^0.1.0" }, "devDependencies": { - "@stdlib/assert-is-browser": "^0.0.8", - "@stdlib/assert-is-string-array": "^0.0.9", - "@stdlib/assert-is-windows": "^0.0.7", - "@stdlib/bench": "^0.0.12", - "@stdlib/math-base-special-floor": "^0.0.8", - "@stdlib/process-exec-path": "^0.0.7", + "@stdlib/assert-is-browser": "^0.1.0", + "@stdlib/assert-is-string-array": "^0.1.0", + "@stdlib/assert-is-windows": "^0.1.0", + "@stdlib/bench": "^0.1.0", + "@stdlib/math-base-special-floor": "^0.1.0", + "@stdlib/process-exec-path": "^0.1.0", "@stdlib/random-base-randu": "^0.0.8", "proxyquire": "^2.0.0", "tape": "git+https://github.com/kgryte/tape.git#fix/globby",