Skip to content

Commit f3b5fe7

Browse files
authored
Merge pull request #9 from audiojs/v3
Modernize / v3
2 parents ff29dc8 + 99d5da3 commit f3b5fe7

147 files changed

Lines changed: 2860 additions & 2025 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/test.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: test
2+
on: [push, pull_request]
3+
jobs:
4+
test:
5+
runs-on: ubuntu-latest
6+
strategy:
7+
matrix:
8+
node: [18, 20, 22]
9+
steps:
10+
- uses: actions/checkout@v4
11+
- uses: actions/setup-node@v4
12+
with:
13+
node-version: ${{ matrix.node }}
14+
- run: npm install
15+
- run: npm test

.gitignore

Lines changed: 3 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,4 @@
1-
2-
# Directories #
3-
###############
4-
reports/
5-
build/
6-
7-
# Compiled source #
8-
###################
9-
*.com
10-
*.class
11-
*.dll
12-
*.exe
13-
*.o
14-
*.so
15-
16-
# Packages #
17-
############
18-
# it's better to unpack these files and commit the raw source
19-
# git has its own built in compression methods
20-
*.7z
21-
*.dmg
22-
*.gz
23-
*.iso
24-
*.jar
25-
*.rar
26-
*.tar
27-
*.zip
28-
29-
# Logs and databases #
30-
######################
31-
*.log
32-
*.sql
33-
*.sqlite
34-
35-
# OS generated files #
36-
######################
1+
node_modules/
372
.DS_Store
38-
.DS_Store?
39-
._*
40-
.Spotlight-V100
41-
.Trashes
42-
Icon?
43-
ehthumbs.db
44-
Thumbs.db
45-
Desktop.ini
46-
47-
# Temporary files #
48-
###################
49-
*~
50-
51-
# Node.js #
52-
###########
53-
/node_modules/
54-
55-
# Matlab #
56-
##########
57-
58-
# Windows default autosave extension
59-
*.asv
60-
61-
# Compiled MEX binaries (all platforms)
62-
*.mex*
3+
*.log
4+
.claude/

.npmignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
docs/
2+
test.js
3+
.travis.yml
4+
.claude/

.travis.yml

Lines changed: 0 additions & 5 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Changelog
2+
3+
## 3.0.0
4+
5+
Breaking: ESM-only. `require()` no longer works.
6+
7+
- **34 window functions** (was 18): added connes, powerOfSine, generalizedNormal, planckTaper, exponential, hannPoisson, cauchy, rifeVincent, confinedGaussian, kaiserBesselDerived, dolphChebyshev, taylor, dpss, ultraspherical, parzen, bohman
8+
- **Quantitative metrics**: `enbw`, `scallopLoss`, `cola`
9+
- **Individual files**: `import hann from 'window-function/hann'`
10+
- **Default + named exports**: both `import hann from` and `import { hann } from` work
11+
- **TypeScript declarations** included
12+
- **Scientific SVG plots** for all windows (time domain + frequency response)
13+
- Consolidated to ESM (`"type": "module"`)
14+
- Single `util.js` for shared helpers and utilities
15+
- Zero dependencies (fourier-transform is devDependency for plot generation only)
16+
17+
### Migration
18+
19+
```diff
20+
- const hann = require('window-function/hann')
21+
+ import hann from 'window-function/hann'
22+
```
23+
24+
The per-sample API `fn(i, N, ...params) → number` is unchanged.
25+
26+
## 2.1.0
27+
28+
- Added `apply` and `generate` helpers
29+
30+
## 2.0.2
31+
32+
- 18 window functions: rectangular, triangular, bartlett, welch, hann, hamming, cosine, blackman, exactBlackman, nuttall, blackmanNuttall, blackmanHarris, flatTop, bartlettHann, lanczos, gaussian, tukey

0 commit comments

Comments
 (0)