@errozero/beatstepper
Advanced tools
Comparing version 1.0.7 to 1.0.8
@@ -7,5 +7,8 @@ { | ||
}, | ||
"version": "1.0.7", | ||
"type": "module", | ||
"version": "1.0.8", | ||
"description": "", | ||
"main": "dist/Beatstepper.js", | ||
"exports": { | ||
".": "./dist/index.js" | ||
}, | ||
"scripts": { | ||
@@ -17,3 +20,2 @@ "test": "echo \"Error: no test specified\" && exit 1", | ||
"license": "MIT", | ||
"types": "dist/index.d.ts", | ||
"prepublish": "tsc", | ||
@@ -20,0 +22,0 @@ "keywords": [ |
@@ -13,7 +13,7 @@ # Beatstepper | ||
```javascript | ||
import Beatstepper from '@errozero/beatstepper'; | ||
```typescript | ||
import { Beatstepper, IBeatstepperCallbackData } from '@errozero/beatstepper'; | ||
const ctx = new AudioContext(); | ||
const callback = data => { | ||
const callback = (data:IBeatstepperCallbackData) => { | ||
console.log('Step!', data); | ||
@@ -26,3 +26,3 @@ }; | ||
Now that is setup, call the start method to begin scheduling: | ||
```javascript | ||
```typescript | ||
beatstepper.start() | ||
@@ -94,4 +94,4 @@ ``` | ||
## Metronome example | ||
```javascript | ||
import Beatstepper from '@errozero/beatstepper'; | ||
```typescript | ||
import { Beatstepper, IBeatstepperCallbackData } from '@errozero/beatstepper'; | ||
@@ -102,3 +102,3 @@ const context = new AudioContext(); | ||
const callback = data => { | ||
const callback = (data:IBeatstepperCallbackData) => { | ||
const freq = (data.step % stepsPerBeat == 0) ? 880 : 440; | ||
@@ -105,0 +105,0 @@ const oscillator = context.createOscillator(); |
@@ -27,4 +27,4 @@ { | ||
/* Modules */ | ||
"module": "commonjs", /* Specify what module code is generated. */ | ||
// "rootDir": "./", /* Specify the root folder within your source files. */ | ||
"module": "ES6", /* Specify what module code is generated. */ | ||
"rootDir": "./src", /* Specify the root folder within your source files. */ | ||
// "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ | ||
@@ -31,0 +31,0 @@ // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Yes
18978
6
249
1