0.9.8 • Published 6 months ago
jisg v0.9.8
jisg
Implementations of select OEIS integer sequences in JavaScript, portially inspired by intseq.
Install
yarn add jisg
Usage
Build System
import {A000045} from 'jisg'
const generator = A000045()
for (let i=0; i<43; i++) {
console.log(generator.next().value)
}
Node
const {A000045} = require('jisg')
for (const i of A000045()) {
console.log(i)
}
Script Tags
<script src="https://unpkg.com/jisg"></script>
<script>
const generator = jisg.A000045()
setInterval(
function() => {
document.write(
generator.next().value,
', '
)
},
666
)
</script>
Demos on CodePen
In Your Browser
Read the Docs
CLI Commands
yarn install
: Install dependenciesyarn dev
: Run tests when source files are changedyarn lint --fix
: Lint with ESLintyarn test
: Run Jest testsyarn doc
: Build documentationyarn build
: Production buildyarn prepublish
: Prepare for publishingyarn publish
: Publish to npm
Feedback
- Report bug and feature requests as GitHub Issues
Contributing
Adding a Sequence Generator
- Fork me and clone your repo locally.
- Copy the beginning of the sequence from The On-line Encyclopedia of Integer Sequences into a new entry in
OEIS_START_SAMPLES
in index.test.ts. Append an "n" to each integer so they areBigInt
type (regex replace:/(\d+)/\1n/
). - Create the source file in src/oeis/ using the OEIS number (eg. "A000001.ts") and add an entry in index.ts.
- Implement the generator so that the test case passes (eg.
yarn test -t A000001
). If the test takes longer than 10 seconds, remove integers from the end of the sample until it takes less than 10 seconds. - Check code style and test coverage with
yarn prepublish
and fix any issues. - Push to GitHub and submit a pull request.
Sponsorship
0.9.8
6 months ago
0.9.7
8 months ago
0.9.0
8 months ago
0.8.0
8 months ago
0.9.2
8 months ago
0.9.1
8 months ago
0.7.9
1 year ago
0.7.8
1 year ago
0.7.7
2 years ago
0.7.6
2 years ago
0.7.5
2 years ago
0.7.2
2 years ago
0.7.3
2 years ago
0.6.9
2 years ago
0.7.1
2 years ago
0.7.0
2 years ago
0.5.13
2 years ago
0.5.12
3 years ago
0.5.11
3 years ago
0.5.10
3 years ago
0.5.8
3 years ago
0.5.7
3 years ago
0.5.6
3 years ago
0.5.5
3 years ago
0.5.3
3 years ago
0.5.2
3 years ago
0.5.0
3 years ago
0.5.1
3 years ago
0.4.2
3 years ago
0.4.0
3 years ago
0.3.0
3 years ago
0.2.6
3 years ago
0.2.5
3 years ago
0.2.4
3 years ago
0.2.3
3 years ago
0.2.2
3 years ago
0.2.0
3 years ago
0.1.0
3 years ago
0.0.1
3 years ago