Installations
npm install @stdlib/types
Developer Guide
Typescript
Yes
Module System
CommonJS, UMD
Min. Node Version
>=0.10.0
Node Version
20.18.0
NPM Version
10.8.2
Score
100
Supply Chain
99.6
Quality
84.3
Maintenance
100
Vulnerability
88
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
TypeScript (86.65%)
JavaScript (13.35%)
Developer
stdlib-js
Download Statistics
Total Downloads
80,698,295
Last Day
73,886
Last Week
315,504
Last Month
1,437,778
Last Year
32,183,177
GitHub Statistics
2 Stars
149 Commits
4 Watching
2 Branches
11 Contributors
Bundle Size
171.00 B
Minified
144.00 B
Minified + Gzipped
Sponsor this package
Package Meta Information
Latest Version
0.4.3
Package Id
@stdlib/types@0.4.3
Unpacked Size
130.76 kB
Size
19.82 kB
File Count
10
NPM Version
10.8.2
Node Version
20.18.0
Publised On
05 Nov 2024
Total Downloads
Cumulative downloads
Total Downloads
80,698,295
Last day
-10%
73,886
Compared to previous day
Last week
-16.9%
315,504
Compared to previous week
Last month
2%
1,437,778
Compared to previous month
Last year
-14.6%
32,183,177
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
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!
Type Declarations
TypeScript type declarations for stdlib.
Installation
1npm install @stdlib/types
Usage
1/// <reference types="@stdlib/types"/> 2 3import { ArrayLike } from '@stdlib/types/array'; 4 5function sum( x: ArrayLike<number> ): number { 6 let s = 0.0; 7 for ( let i = 0; i < x.length; i++ ) { 8 s += x[ i ]; 9 } 10 return s; 11}
Type declarations are organized as modules. For example, to use iterator type declarations,
1/// <reference types="@stdlib/types"/> 2 3import { Iterator } from '@stdlib/types/iter'; 4 5function sum( iter: Iterator ): number { 6 let s = 0.0; 7 while ( true ) { 8 let v = iter.next(); 9 if ( v.done ) { 10 break; 11 } 12 s += v.value; 13 } 14 return s; 15}
For the complete list of declared modules, see the index.d.ts
type declaration file.
Notes
-
In order to use included TypeScript declarations, configure your
tsconfig.json
file accordingly. For example,1{ 2 "compilerOptions": { 3 ... 4 "typeRoots": [ "./path/to/@stdlib/types" ], 5 ... 6 }, 7 ... 8}
Notice
This package is part of stdlib, a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more.
For more information on the project, filing bug reports and feature requests, and guidance on how to develop stdlib, see the main project repository.
Community
License
See LICENSE.
Copyright
Copyright © 2016-2024. The Stdlib Authors.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0
Reason
security policy file detected
Details
- Info: security policy file detected: SECURITY.md:1
- Info: Found linked content: SECURITY.md:1
- Warn: One or no descriptive hints of disclosure, vulnerability, and/or timelines in security policy
- Info: Found text in security policy: SECURITY.md:1
Reason
5 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 4
Reason
dependency not pinned by hash detected -- score normalized to 4
Details
- Warn: npmCommand not pinned by hash: .github/workflows/examples.yml:58
- Warn: npmCommand not pinned by hash: .github/workflows/examples.yml:58
- Warn: npmCommand not pinned by hash: .github/workflows/examples.yml:58
- Warn: npmCommand not pinned by hash: .github/workflows/test.yml:76
- Warn: npmCommand not pinned by hash: .github/workflows/test.yml:76
- Warn: npmCommand not pinned by hash: .github/workflows/test.yml:76
- Warn: npmCommand not pinned by hash: .github/workflows/test.yml:83
- Warn: npmCommand not pinned by hash: .github/workflows/test_coverage.yml:67
- Warn: npmCommand not pinned by hash: .github/workflows/test_coverage.yml:67
- Warn: npmCommand not pinned by hash: .github/workflows/test_coverage.yml:67
- Warn: npmCommand not pinned by hash: .github/workflows/test_coverage.yml:74
- Warn: npmCommand not pinned by hash: .github/workflows/test_install.yml:75
- Warn: npmCommand not pinned by hash: .github/workflows/test_install.yml:75
- Warn: npmCommand not pinned by hash: .github/workflows/test_install.yml:75
- Warn: npmCommand not pinned by hash: .github/workflows/test_published_package.yml:93
- Info: 15 out of 15 GitHub-owned GitHubAction dependencies pinned
- Info: 12 out of 12 third-party GitHubAction dependencies pinned
- Info: 0 out of 15 npmCommand dependencies pinned
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/cancel.yml:1
- Warn: no topLevel permission defined: .github/workflows/close_pull_requests.yml:1
- Warn: no topLevel permission defined: .github/workflows/examples.yml:1
- Warn: no topLevel permission defined: .github/workflows/npm_downloads.yml:1
- Warn: no topLevel permission defined: .github/workflows/publish.yml:1
- Warn: no topLevel permission defined: .github/workflows/test.yml:1
- Warn: no topLevel permission defined: .github/workflows/test_coverage.yml:1
- Warn: no topLevel permission defined: .github/workflows/test_install.yml:1
- Warn: no topLevel permission defined: .github/workflows/test_published_package.yml:1
- Info: no jobLevel write permissions found
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'main'
Score
4.6
/10
Last Scanned on 2025-01-27
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More