open-index/open-npm huggingface dataset:
npm package: @psse-cpu/fixed-size-array
Description: JS/TS package to emulate fixed-size arrays from C/C++/Java and even Dart.  Only used in SE-1222 (Data Structures) exercises.  Not for production use.
Author: Richard Michael Coo
Latest version: 0.0.8
Deprecated: Object.seal is simpler + native

# @psse-cpu/fixed-size-array

### :warning: deprecated, do not use

`Object.seal` only fails silently on the Node.js REPL, it fails when actually
ran in a Node.js app.  This package is not a native array and will give more
headaches than benefits.

JS/TS package to emulate fixed-size arrays from C/C++/Java and even Dart.  
Only used in SE-1222 (Data Structures) exercises.  Not for production use.

### Getting started

##### Installing
`npm i @psse-cpu/fixed-size-array`

##### Using
```ts
let array = new FixedSizeArray(5, 0)
array[0] = 13
array[1] = 235
array[2] = 111
array[3] = 21
array[4] = 15

console.log('The array', array.toNativeArray())

let stringArray = new FixedSizeArray(5, '')

class Dog { /* ... */ }

let objectArray = new FixedSizeArray<Dog>(5, undefined)

let usingFrom = FixedSizeArray.from([1, 9, 2])
usingFrom[3] = 60 // won't work
```

### Alternatives

`Object.seal` can also mimic fixed-size arrays, but silently failing in some
illegal operations may trip off beginners.

```js
let x = Object.seal([1, 2, 3])
// x = [ 1, 2, 3 ]

x[3] = 99
// silently fails
```

### Why?

The goal is to ue only one language for the newest batch Yechezkel, JS/TS, 
allow them to master one, and just switch later on as needed.

https://youtu.be/CjVFSWchhEo?t=294

Unfortunately, JS has no fixed-size array, and to create data structures from
scratch (especially array lists), this package is provided.

### TODO

- more tests
- ESLint
- Prettier
- `FixedSizeArray.from`

## PRs and bug reports welcome!
npm package: @psse-cpu/tokenizer
Description: Tokenizers for Infix strings. Only for SE-1222 (Data Structures) class, not for production use.
Author: Richard Michael Coo
Latest version: 0.1.1

### InfixTokenizer

Use this package if you find it hard to tokenize infix expressions.
Meant to be used for my SE-1222 (Data Structures) class, and not for production use.

### Getting started

##### Installing
`npm i @psse-cpu/tokenizer`

##### Using
```ts
let tokenizer = new InfixTokenizer('((33 - 7) / sin(    90/3 ) + 24.53 ^ 2) * ln(1)')
tokenizer.hasMoreTokens() // true
tokenizer.readToken() // (
tokenizer.hasMoreTokens() // true
tokenizer.readToken() // (
tokenizer.hasMoreTokens() // true
tokenizer.readToken() // 33
tokenizer.hasMoreTokens() // true
tokenizer.readToken() // -
tokenizer.hasMoreTokens() // true
tokenizer.readToken() // 7

/* ...etc, until the last 5 tokens */
tokenizer.hasMoreTokens() // true
tokenizer.readToken() // *
tokenizer.hasMoreTokens() // true
tokenizer.readToken() // ln
tokenizer.hasMoreTokens() // true
tokenizer.readToken() // (
tokenizer.hasMoreTokens() // true
tokenizer.readToken() // 1
tokenizer.hasMoreTokens() // true
tokenizer.readToken() // )
tokenizer.hasMoreTokens() // false
tokenizer.readToken() // undefined
```

Default function names recognized are:
```ts
[
  'sin',
  'cos',
  'tan',
  'arcsin',
  'arccos',
  'arctan',
  'log',
  'ln',
  'sqrt',
  'cbrt'
]
```

If you need more Math functions, just give your own custom list in
the constructor.

```ts
let tokenizer = new InfixTokenizer('cosh(9) + cos(5)', ['sinh', 'cosh'])
// tokens are 

[
  'cosh',
  '(',
  '9',
  ')',
  '+',
  'cos',
  '(',
  '5',
  ')'
]
```