npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

scholarjs

v0.1.3

Published

Advanced offline educational platform with local training system, premium CLI, and comprehensive datasets.

Readme

ScholarJS v0.1.1

What is ScholarJS?

ScholarJS is an open-source NPM package and CLI toolkit designed to help students learn through Education Stream System - a comprehensive curriculum framework for Grade 11 & 12 students. It provides ~100MB of educational datasets, Local Training Engine, and deterministic algorithms for academic excellence.

🎓 Education Stream System: Complete Curriculum Framework + Local Training Engine

Installation

npm install scholarjs

CLI Usage

After installation, use the scholar command for the Education Stream System:

# Install globally for CLI access
npm install -g scholarjs

# Initial setup
scholar setup

# Choose your education stream
scholar streams enable pcmc    # Physics, Chemistry, Math, Computer Science
scholar streams enable pcmb    # Physics, Chemistry, Math, Biology
scholar streams enable commerce # Business Studies, Accountancy, Economics
scholar streams enable arts    # History, Civics, Sociology, Psychology

# Train the system on your stream
scholar train

# Start learning
scholar search "physics constants"    # Search trained knowledge
scholar quiz                          # Interactive quiz from your stream
scholar quiz generate pcmc 10         # Generate 10 questions from PCM-C

# Dataset management
scholar datasets list
scholar datasets stats chemistry/periodic-table
scholar datasets search chemistry/periodic-table "hydrogen"

# Offline documentation
scholar docs offline
scholar docs offline show getting-started

# Get help
scholar help
scholar help streams

Education Stream System (v0.1.1)

ScholarJS v0.1.1 introduces a comprehensive Education Stream System designed for Grade 11 & 12 students:

🎓 Available Streams

PCM-C (Physics, Chemistry, Mathematics, Computer Science)

  • Focus: Engineering and technology careers
  • Subjects: Physics, Chemistry, Mathematics, Computer Science
  • Features: Programming fundamentals, engineering mathematics, computer science theory

PCM-B (Physics, Chemistry, Mathematics, Biology)

  • Focus: Medical and healthcare careers
  • Subjects: Physics, Chemistry, Mathematics, Biology
  • Features: Life sciences, medical foundations, research methodology

Commerce (Business Studies, Accountancy, Economics, Statistics)

  • Focus: Business and finance careers
  • Subjects: Business Studies, Accountancy, Economics, Statistics
  • Features: Financial literacy, business management, data analysis

Arts & Humanities (History, Civics, Sociology, Psychology)

  • Focus: Social sciences and humanities
  • Subjects: History, Civics, Sociology, Psychology
  • Features: Critical thinking, communication, social analysis

Bio-Science (Botany, Zoology, Ecology)

  • Focus: Specialized biological research
  • Subjects: Botany, Zoology, Ecology
  • Features: Environmental science, biodiversity, research skills

🧠 Local Training Engine

The deterministic training system processes educational content without AI/ML:

  1. Tokenization: Clean text processing with normalization
  2. Indexing: Build inverted indexes for fast search
  3. Graph Building: Create knowledge relationships
  4. Compression: Lossless data compression
  5. Validation: Ensure data integrity throughout

📊 Dataset Features

ScholarJS v0.0.9 includes ~100MB of educational datasets with advanced management capabilities:

📊 Dataset Categories

  • Chemistry: Complete periodic table, isotopes, organic compounds, spectral data, reactions
  • Biology: Species taxonomy, human anatomy, cell structures, DNA sequences, ecosystems
  • Mathematics: Formula encyclopedia, geometry, algebra identities, number sequences
  • Physics: SI constants, material properties, nuclear data, NIST reference values
  • Geography: World countries, capitals, climate data, geographical features
  • General: Units conversions, famous scientists, historical timelines

⚡ Performance Features

  • Chunked Loading: Process large datasets in memory-efficient chunks
  • Lazy Loading: Load datasets on-demand to reduce startup time
  • Fast Indexing: Sub-second search with inverted indexes
  • Checksum Verification: Ensure data integrity with MD5 verification
  • Intelligent Caching: Cache to .scholar/ directory with metadata

🔍 Advanced Search

const { DatasetEngine } = require('scholarjs/src/core');

// Fast text search
const results = await engine.fastSearch('chemistry/periodic-table', 'hydrogen');

// Complex queries
const elements = await engine.deepFind('chemistry/periodic-table', {
  atomic_number: { $gte: 1, $lte: 10 }
});

// Range queries
const lightElements = await engine.rangeQuery('chemistry/periodic-table', 'atomic_mass', 1, 20);

// Similarity matching
const similar = await engine.similarityMatch('chemistry/periodic-table', targetElement);

Local Learning Engine (LLE) Features

Core LLE API

const { Trainer, DatasetIndexer, SummaryGenerator } = require('scholarjs');

// Initialize LLE
const trainer = new Trainer();

// Learn from all datasets (indexes, detects patterns, builds knowledge graph)
await trainer.learn();

// Analyze topics with rule-based algorithms
const analysis = trainer.analyze('calculus');
console.log(analysis.summary);

// Search across all datasets
const indexer = new DatasetIndexer();
const results = indexer.search('physics');
console.log(results);

// Generate summaries
const generator = new SummaryGenerator();
console.log(generator.generateGlobalSummary());

Subject Modules with LLE Integration

Math Module

const { MathModule } = require('scholarjs/src/modules');

const math = new MathModule();

// Access LLE-indexed datasets
const datasets = math.getDatasets();
const algebraTopics = math.searchMathTopics('equations');

// Calculations
console.log('Factorial:', math.factorial(5));
console.log('Linear solution:', math.solveLinearEquation(2, 4, 10)); // x = 7

Physics Module

const { PhysicsModule } = require('scholarjs/src/modules');

const physics = new PhysicsModule();

// Dataset integration
const mechanicsData = physics.searchPhysicsTopics('force');

// Constants from indexed datasets
console.log('Speed of light:', physics.getSpeedOfLight());
console.log('Gravitational constant:', physics.getGravitationalConstant());

// Calculations
console.log('Force:', physics.calculateForce(10, 5)); // 50N
console.log('Kinetic energy:', physics.kineticEnergy(2, 10)); // 100J

Chemistry Module

const { ChemistryModule } = require('scholarjs/src/modules');

const chemistry = new ChemistryModule();

// Search chemical concepts
const organicTopics = chemistry.searchChemistryTopics('acids');

// Get element data from indexed periodic table
const oxygen = chemistry.getElement('O');
console.log(oxygen); // { symbol: 'O', atomic_number: 8, ... }

// Reaction information
const reactions = chemistry.getReactionInfo('combustion');

Biology Module

const { BiologyModule } = require('scholarjs/src/modules');

const biology = new BiologyModule();

// Access biological datasets
const cellTopics = biology.searchBiologyTopics('mitosis');

// Get detailed information
const nucleus = biology.getCellInfo('Nucleus');
const genetics = biology.getGeneticInfo('DNA Replication');

General Knowledge Module

const { GeneralModule } = require('scholarjs/src/modules');

const general = new GeneralModule();

// Geographic and historical data
const everest = general.getGeographicInfo('Mount Everest');
const industrialRev = general.getHistoricalEvent('Industrial Revolution');

// Computer science concepts
const algorithm = general.getComputerScienceConcept('Algorithm');

Core Utilities

import { logger, stats } from 'scholarjs';

// Logging
logger.info('Mathematics module loaded successfully.');
logger.success('Chemistry dataset validated: 118 elements.');

// Stats tracking
stats.track('algebra.solveLinear');
console.log(stats.report()); // View usage, errors, performance

Scholar Explain Engine

import { explain } from 'scholarjs';

console.log(explain.explainMath('quadratic_formula'));
// { definition: '...', formula: 'x = [-b ± √(b² - 4ac)] / (2a)', steps: [...], example: '...' }

Quiz Generator

import { quiz } from 'scholarjs';

const mathQuizzes = quiz.generateMathQuiz('easy', 3);
console.log(mathQuizzes[0]); // { type: 'multiple_choice', question: '...', options: [...], answer: ... }

Unit Converter

import { converter } from 'scholarjs';

console.log(converter.convert(1000, 'm', 'km', 'length')); // 1
console.log(converter.convert(32, 'fahrenheit', 'celsius', 'temperature')); // 0

Equation Solver 2.0

import { solver } from 'scholarjs';

console.log(solver.solvePolynomial([1, -5, 6])); // [2, 3] for x²-5x+6=0
console.log(solver.solveLinearSystem([[1,2],[3,4]], [5,11])); // [1, 2]

Visualization Helpers

import { visualization } from 'scholarjs';

console.log(visualization.createASCIIBarChart({ A: 10, B: 20, C: 15 }));
// A: ██████████ (10)
// B: ████████████████████ (20)
// ...

Scholar Profiles

import { profiles } from 'scholarjs';

profiles.createProfile('student1', { difficulty: 'medium' });
profiles.addQuizResult('student1', { score: 85 });
console.log(profiles.getProfileStats('student1')); // { totalQuizzes: 1, averageScore: 85, ... }

Data Sources

  • Periodic Table: Chemistry functions use data from src/data/periodic-table.json, sourced from PubChem.
  • Biology: Basic biological calculations and classifications.

Error Handling

All functions include input validation and throw descriptive errors for invalid inputs, such as:

  • Invalid chemical formulas or element symbols
  • Non-positive numbers for physical quantities
  • Invalid DNA sequences (only A, T, C, G allowed)
  • Unknown cell types

Project Structure

src/
├── core/
│   ├── index.js          # Main exports
│   ├── logger.js         # Professional logging utility
│   ├── stats.js          # Built-in usage and performance tracker
│   └── validator.js      # Unified input validation
├── bin/
│   └── scholar
├── src/
│   ├── cli/
│   │   ├── commands/
│   │   │   ├── explain.js
│   │   │   ├── quiz.js
│   │   │   ├── convert.js
│   │   │   ├── search.js
│   │   │   ├── profile.js
│   │   │   ├── datasets.js
│   │   │   └── settings.js
│   │   ├── utils/
│   │   │   ├── printer.js
│   │   │   ├── input.js
│   │   │   ├── table.js
│   │   │   └── colors.js
│   │   ├── index.js
│   │   └── cli.js
│   ├── core/
│   │   ├── index.js
│   │   ├── logger.js
│   │   ├── validator.js
│   │   ├── stats.js
│   │   ├── dataset.js
│   │   ├── explain.js
│   │   ├── quizzes.js
│   │   ├── converter.js
│   │   ├── profiles.js
│   │   └── graphing.js
│   ├── modules/
│   │   ├── programming/
│   │   │   └── index.js
│   │   ├── math/
│   │   │   ├── index.js
│   │   │   ├── algebra.js
│   │   │   ├── geometry.js
│   │   │   ├── calculus.js
│   │   │   └── solver.js
│   │   ├── physics/
│   │   │   ├── index.js
│   │   │   ├── constants.js
│   │   │   ├── mechanics.js
│   │   │   └── thermo.js
│   │   ├── chemistry/
│   │   │   ├── index.js
│   │   │   ├── parser.js
│   │   │   └── periodicTable.js
│   │   ├── biology/
│   │   │   ├── index.js
│   │   │   ├── cells.js
│   │   │   ├── dna.js
│   │   │   └── organisms.js
│   │   ├── astronomy/
│   │   │   └── index.js
│   │   ├── geography/
│   │   │   └── index.js
│   │   └── history/
│       │   └── index.js
│   ├── data/
│   │   ├── periodic-table.json
│   │   ├── biology.json
│   │   ├── cells.json
│   │   ├── organisms.json
│   │   ├── physics-constants.json
│   │   ├── math-formulas.json
│   │   ├── anatomy.json
│   │   ├── countries.json
│   │   ├── capitals.json
│   │   ├── rivers.json
│   │   ├── mountains.json
│   │   ├── continents.json
│   │   ├── stars.json
│   │   ├── planets.json
│   │   ├── moons.json
│   │   ├── messier.json
│   │   ├── animals.json
│   │   ├── plants.json
│   │   ├── vocabulary.json
│   │   ├── books.json
│   │   ├── events.json
│   │   ├── scientists.json
│   │   └── theorems.json
│   ├── utils/
│   │   ├── file.js
│   │   ├── mathUtils.js
│   │   ├── chemUtils.js
│   │   ├── bioUtils.js
│   │   └── physicsUtils.js
│   └── types/
│       └── index.d.ts
└── package.json

How to Contribute

We welcome contributions! Please feel free to submit a Pull Request.

License

MIT