@sc-voice/tools 3.10.0 → 3.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.mjs CHANGED
@@ -1,3 +1,7 @@
1
+ import { Assert } from './src/js/assert.mjs';
2
+ export const JS = {
3
+ Assert,
4
+ }
1
5
 
2
6
  import { Fraction } from './src/math/fraction.mjs';
3
7
  import { Interval } from './src/math/interval.mjs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sc-voice/tools",
3
- "version": "3.10.0",
3
+ "version": "3.12.0",
4
4
  "description": "Utilities for SC-Voice",
5
5
  "main": "index.mjs",
6
6
  "files": [
@@ -0,0 +1,8 @@
1
+ export class Assert {
2
+ static ok(expr, msg) {
3
+ if (!expr) {
4
+ throw new Error(msg || 'Unknown assertion error');
5
+ }
6
+ return expr;
7
+ }
8
+ }
@@ -217,6 +217,12 @@ export class Unicode {
217
217
  static get ELLIPSIS() {
218
218
  return '\u2026';
219
219
  }
220
+ static get IMPLIES() {
221
+ return '\u21D2';
222
+ }
223
+ static get ELEMENT_OF() {
224
+ return '\u2208';
225
+ }
220
226
  static get A_MACRON() {
221
227
  return '\u0100';
222
228
  }
@@ -346,6 +352,12 @@ export class Unicode {
346
352
  get ELLIPSIS() {
347
353
  return Unicode.ELLIPSIS;
348
354
  }
355
+ get IMPLIES(){
356
+ return Unicode.IMPLIES;
357
+ }
358
+ get ELEMENT_OF() {
359
+ return Unicode.ELEMENT_OF;
360
+ }
349
361
  get A_MACRON() {
350
362
  return Unicode.A_MACRON;
351
363
  }