├── .editorconfig ├── .github └── workflows │ └── main.yml ├── .gitignore ├── .npmrc ├── .prettierignore ├── build.js ├── funding.yml ├── index.js ├── license ├── package.json ├── readme.md ├── test.js └── tsconfig.json /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: main 2 | on: 3 | - pull_request 4 | - push 5 | jobs: 6 | main: 7 | name: ${{matrix.node}} 8 | runs-on: ubuntu-latest 9 | steps: 10 | - uses: actions/checkout@v3 11 | - uses: actions/setup-node@v3 12 | with: 13 | node-version: ${{matrix.node}} 14 | - run: npm install 15 | - run: npm test 16 | - uses: codecov/codecov-action@v1 17 | strategy: 18 | matrix: 19 | node: 20 | - lts/hydrogen 21 | - node 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *.d.ts 3 | *.log 4 | coverage/ 5 | node_modules/ 6 | yarn.lock 7 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | coverage/ 2 | *.md 3 | -------------------------------------------------------------------------------- /build.js: -------------------------------------------------------------------------------- 1 | import fs from 'node:fs/promises' 2 | import fetch from 'node-fetch' 3 | import {fromHtml} from 'hast-util-from-html' 4 | import {selectAll} from 'hast-util-select' 5 | import {toString} from 'hast-util-to-string' 6 | 7 | const response = await fetch( 8 | 'https://www.readabilityformulas.com/articles/spache-formula-word-list.php' 9 | ) 10 | const text = await response.text() 11 | 12 | const tree = fromHtml(text) 13 | 14 | const values = selectAll('td p', tree) 15 | .map((d) => toString(d)) 16 | .join('|') 17 | .replace(/\\/g, "'") 18 | .trim() 19 | .toLowerCase() 20 | .split(/\s*\|\s*/g) 21 | .filter(Boolean) 22 | .sort() 23 | 24 | await fs.writeFile( 25 | 'index.js', 26 | '/**\n * List of familiar American-English words: Revised Spache (1974)\n*/\nexport const spache = ' + 27 | JSON.stringify([...new Set(values)], null, 2) + 28 | '\n' 29 | ) 30 | -------------------------------------------------------------------------------- /funding.yml: -------------------------------------------------------------------------------- 1 | github: wooorm 2 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * List of familiar American-English words: Revised Spache (1974) 3 | */ 4 | export const spache = [ 5 | 'a', 6 | 'able', 7 | 'about', 8 | 'above', 9 | 'across', 10 | 'act', 11 | 'add', 12 | 'afraid', 13 | 'after', 14 | 'afternoon', 15 | 'again', 16 | 'against', 17 | 'ago', 18 | 'air', 19 | 'airplane', 20 | 'alarm', 21 | 'all', 22 | 'almost', 23 | 'alone', 24 | 'along', 25 | 'already', 26 | 'also', 27 | 'always', 28 | 'am', 29 | 'among', 30 | 'an', 31 | 'and', 32 | 'angry', 33 | 'animal', 34 | 'another', 35 | 'answer', 36 | 'any', 37 | 'anyone', 38 | 'appear', 39 | 'apple', 40 | 'are', 41 | 'arm', 42 | 'around', 43 | 'arrow', 44 | 'as', 45 | 'ask', 46 | 'asleep', 47 | 'at', 48 | 'ate', 49 | 'attention', 50 | 'aunt', 51 | 'awake', 52 | 'away', 53 | 'b', 54 | 'baby', 55 | 'back', 56 | 'bad', 57 | 'bag', 58 | 'ball', 59 | 'balloon', 60 | 'bang', 61 | 'bank', 62 | 'bark', 63 | 'barn', 64 | 'basket', 65 | 'be', 66 | 'bean', 67 | 'bear', 68 | 'beat', 69 | 'beautiful', 70 | 'became', 71 | 'because', 72 | 'become', 73 | 'bed', 74 | 'bee', 75 | 'been', 76 | 'before', 77 | 'began', 78 | 'begin', 79 | 'behind', 80 | 'believe', 81 | 'bell', 82 | 'belong', 83 | 'bend', 84 | 'bent', 85 | 'beside', 86 | 'best', 87 | 'better', 88 | 'between', 89 | 'big', 90 | 'bird', 91 | 'birthday', 92 | 'bit', 93 | 'bite', 94 | 'black', 95 | 'blanket', 96 | 'blew', 97 | 'block', 98 | 'blow', 99 | 'blue', 100 | 'board', 101 | 'boat', 102 | 'book', 103 | 'boot', 104 | 'born', 105 | 'borrow', 106 | 'both', 107 | 'bother', 108 | 'bottle', 109 | 'bottom', 110 | 'bought', 111 | 'bow', 112 | 'box', 113 | 'boy', 114 | 'branch', 115 | 'brave', 116 | 'bread', 117 | 'break', 118 | 'breakfast', 119 | 'breath', 120 | 'brick', 121 | 'bridge', 122 | 'bright', 123 | 'bring', 124 | 'broke', 125 | 'broken', 126 | 'brother', 127 | 'brought', 128 | 'brown', 129 | 'brush', 130 | 'build', 131 | 'bump', 132 | 'burn', 133 | 'bus', 134 | 'busy', 135 | 'but', 136 | 'butter', 137 | 'button', 138 | 'buy', 139 | 'by', 140 | 'c', 141 | 'cabin', 142 | 'cage', 143 | 'cake', 144 | 'call', 145 | 'came', 146 | 'camp', 147 | 'can', 148 | "can't", 149 | 'candle', 150 | 'candy', 151 | 'cap', 152 | 'captain', 153 | 'car', 154 | 'card', 155 | 'care', 156 | 'careful', 157 | 'carrot', 158 | 'carry', 159 | 'case', 160 | 'castle', 161 | 'cat', 162 | 'catch', 163 | 'cattle', 164 | 'caught', 165 | 'cause', 166 | 'cent', 167 | 'certain', 168 | 'chair', 169 | 'chance', 170 | 'change', 171 | 'chase', 172 | 'chicken', 173 | 'chief', 174 | 'child', 175 | 'children', 176 | 'church', 177 | 'circle', 178 | 'circus', 179 | 'city', 180 | 'clap', 181 | 'clean', 182 | 'clever', 183 | 'cliff', 184 | 'climb', 185 | 'clock', 186 | 'close', 187 | 'cloth', 188 | 'clothes', 189 | 'clown', 190 | 'coat', 191 | 'cold', 192 | 'color', 193 | 'come', 194 | 'comfortable', 195 | 'company', 196 | 'contest', 197 | 'continue', 198 | 'cook', 199 | 'cool', 200 | 'corner', 201 | 'could', 202 | 'count', 203 | 'country', 204 | 'course', 205 | 'cover', 206 | 'cow', 207 | 'crawl', 208 | 'cream', 209 | 'cry', 210 | 'cup', 211 | 'curtain', 212 | 'cut', 213 | 'd', 214 | 'dad', 215 | 'dance', 216 | 'danger', 217 | 'dangerous', 218 | 'dark', 219 | 'dash', 220 | 'daughter', 221 | 'day', 222 | 'dear', 223 | 'decide', 224 | 'deep', 225 | 'desk', 226 | 'did', 227 | "didn't", 228 | 'die', 229 | 'different', 230 | 'dig', 231 | 'dinner', 232 | 'direction', 233 | 'disappear', 234 | 'disappoint', 235 | 'discover', 236 | 'distance', 237 | 'do', 238 | 'doctor', 239 | 'does', 240 | 'dog', 241 | 'dollar', 242 | "don't", 243 | 'done', 244 | 'door', 245 | 'down', 246 | 'dragon', 247 | 'dream', 248 | 'dress', 249 | 'drink', 250 | 'drive', 251 | 'drop', 252 | 'drove', 253 | 'dry', 254 | 'duck', 255 | 'during', 256 | 'dust', 257 | 'e', 258 | 'each', 259 | 'eager', 260 | 'ear', 261 | 'early', 262 | 'earn', 263 | 'earth', 264 | 'easy', 265 | 'eat', 266 | 'edge', 267 | 'egg', 268 | 'eight', 269 | 'eighteen', 270 | 'either', 271 | 'elephant', 272 | 'else', 273 | 'empty', 274 | 'end', 275 | 'enemy', 276 | 'enough', 277 | 'enter', 278 | 'even', 279 | 'ever', 280 | 'every', 281 | 'everything', 282 | 'exact', 283 | 'except', 284 | 'excite', 285 | 'exclaim', 286 | 'explain', 287 | 'eye', 288 | 'face', 289 | 'fact', 290 | 'fair', 291 | 'fall', 292 | 'family', 293 | 'far', 294 | 'farm', 295 | 'farmer', 296 | 'farther', 297 | 'fast', 298 | 'fat', 299 | 'father', 300 | 'feather', 301 | 'feed', 302 | 'feel', 303 | 'feet', 304 | 'fell', 305 | 'fellow', 306 | 'felt', 307 | 'fence', 308 | 'few', 309 | 'field', 310 | 'fierce', 311 | 'fight', 312 | 'figure', 313 | 'fill', 314 | 'final', 315 | 'find', 316 | 'fine', 317 | 'finger', 318 | 'finish', 319 | 'fire', 320 | 'first', 321 | 'fish', 322 | 'five', 323 | 'flag', 324 | 'flash', 325 | 'flat', 326 | 'flew', 327 | 'floor', 328 | 'flower', 329 | 'fly', 330 | 'follow', 331 | 'food', 332 | 'for', 333 | 'forest', 334 | 'forget', 335 | 'forth', 336 | 'found', 337 | 'four', 338 | 'fourth', 339 | 'fox', 340 | 'fresh', 341 | 'friend', 342 | 'frighten', 343 | 'frog', 344 | 'from', 345 | 'front', 346 | 'fruit', 347 | 'full', 348 | 'fun', 349 | 'funny', 350 | 'fur', 351 | 'g', 352 | 'game', 353 | 'garden', 354 | 'gasp', 355 | 'gate', 356 | 'gave', 357 | 'get', 358 | 'giant', 359 | 'gift', 360 | 'girl', 361 | 'give', 362 | 'glad', 363 | 'glass', 364 | 'go', 365 | 'goat', 366 | 'gone', 367 | 'good', 368 | 'got', 369 | 'grandfather', 370 | 'grandmother', 371 | 'grass', 372 | 'gray', 373 | 'great', 374 | 'green', 375 | 'grew', 376 | 'grin', 377 | 'ground', 378 | 'group', 379 | 'grow', 380 | 'growl', 381 | 'guess', 382 | 'gun', 383 | 'h', 384 | 'had', 385 | 'hair', 386 | 'half', 387 | 'hall', 388 | 'hand', 389 | 'handle', 390 | 'hang', 391 | 'happen', 392 | 'happiness', 393 | 'happy', 394 | 'hard', 395 | 'harm', 396 | 'has', 397 | 'hat', 398 | 'hate', 399 | 'have', 400 | 'he', 401 | "he's", 402 | 'head', 403 | 'hear', 404 | 'heard', 405 | 'heavy', 406 | 'held', 407 | 'hello', 408 | 'help', 409 | 'hen', 410 | 'her', 411 | 'here', 412 | 'herself', 413 | 'hid', 414 | 'hide', 415 | 'high', 416 | 'hill', 417 | 'him', 418 | 'himself', 419 | 'his', 420 | 'hit', 421 | 'hold', 422 | 'hole', 423 | 'holiday', 424 | 'home', 425 | 'honey', 426 | 'hop', 427 | 'horn', 428 | 'horse', 429 | 'hot', 430 | 'hour', 431 | 'house', 432 | 'how', 433 | 'howl', 434 | 'hum', 435 | 'hundred', 436 | 'hung', 437 | 'hungry', 438 | 'hunt', 439 | 'hurry', 440 | 'hurt', 441 | 'husband', 442 | 'i', 443 | "i'll", 444 | "i'm", 445 | 'ice', 446 | 'idea', 447 | 'if', 448 | 'imagine', 449 | 'important', 450 | 'in', 451 | 'inch', 452 | 'indeed', 453 | 'inside', 454 | 'instead', 455 | 'into', 456 | 'invite', 457 | 'is', 458 | 'it', 459 | "it's", 460 | 'its', 461 | 'j', 462 | 'jacket', 463 | 'jar', 464 | 'jet', 465 | 'job', 466 | 'join', 467 | 'joke', 468 | 'joy', 469 | 'jump', 470 | 'just', 471 | 'k', 472 | 'keep', 473 | 'kept', 474 | 'key', 475 | 'kick', 476 | 'kill', 477 | 'kind', 478 | 'king', 479 | 'kitchen', 480 | 'kitten', 481 | 'knee', 482 | 'knew', 483 | 'knock', 484 | 'know', 485 | 'l', 486 | 'ladder', 487 | 'lady', 488 | 'laid', 489 | 'lake', 490 | 'land', 491 | 'large', 492 | 'last', 493 | 'late', 494 | 'laugh', 495 | 'lay', 496 | 'lazy', 497 | 'lead', 498 | 'leap', 499 | 'learn', 500 | 'least', 501 | 'leave', 502 | 'left', 503 | 'leg', 504 | 'less', 505 | 'let', 506 | "let's", 507 | 'letter', 508 | 'lick', 509 | 'lift', 510 | 'light', 511 | 'like', 512 | 'line', 513 | 'lion', 514 | 'list', 515 | 'listen', 516 | 'little', 517 | 'live', 518 | 'load', 519 | 'long', 520 | 'look', 521 | 'lost', 522 | 'lot', 523 | 'loud', 524 | 'love', 525 | 'low', 526 | 'luck', 527 | 'lump', 528 | 'lunch', 529 | 'm', 530 | 'machine', 531 | 'made', 532 | 'magic', 533 | 'mail', 534 | 'make', 535 | 'man', 536 | 'many', 537 | 'march', 538 | 'mark', 539 | 'market', 540 | 'master', 541 | 'matter', 542 | 'may', 543 | 'maybe', 544 | 'me', 545 | 'mean', 546 | 'meant', 547 | 'meat', 548 | 'meet', 549 | 'melt', 550 | 'men', 551 | 'merry', 552 | 'met', 553 | 'middle', 554 | 'might', 555 | 'mile', 556 | 'milk', 557 | 'milkman', 558 | 'mind', 559 | 'mine', 560 | 'minute', 561 | 'miss', 562 | 'mistake', 563 | 'moment', 564 | 'money', 565 | 'monkey', 566 | 'month', 567 | 'more', 568 | 'morning', 569 | 'most', 570 | 'mother', 571 | 'mountain', 572 | 'mouse', 573 | 'mouth', 574 | 'move', 575 | 'much', 576 | 'mud', 577 | 'music', 578 | 'must', 579 | 'my', 580 | 'n', 581 | 'name', 582 | 'near', 583 | 'neck', 584 | 'need', 585 | 'needle', 586 | 'neighbor', 587 | 'neighborhood', 588 | 'nest', 589 | 'never', 590 | 'new', 591 | 'next', 592 | 'nibble', 593 | 'nice', 594 | 'night', 595 | 'nine', 596 | 'no', 597 | 'nod', 598 | 'noise', 599 | 'none', 600 | 'north', 601 | 'nose', 602 | 'not', 603 | 'note', 604 | 'nothing', 605 | 'notice', 606 | 'now', 607 | 'number', 608 | 'o', 609 | 'ocean', 610 | 'of', 611 | 'off', 612 | 'offer', 613 | 'often', 614 | 'oh', 615 | 'old', 616 | 'on', 617 | 'once', 618 | 'one', 619 | 'only', 620 | 'open', 621 | 'or', 622 | 'orange', 623 | 'order', 624 | 'other', 625 | 'our', 626 | 'out', 627 | 'outside', 628 | 'over', 629 | 'owl', 630 | 'own', 631 | 'p', 632 | 'pack', 633 | 'paid', 634 | 'pail', 635 | 'paint', 636 | 'pair', 637 | 'palace', 638 | 'pan', 639 | 'paper', 640 | 'parade', 641 | 'parent', 642 | 'park', 643 | 'part', 644 | 'party', 645 | 'pass', 646 | 'past', 647 | 'pasture', 648 | 'path', 649 | 'paw', 650 | 'pay', 651 | 'peanut', 652 | 'peek', 653 | 'pen', 654 | 'penny', 655 | 'people', 656 | 'perfect', 657 | 'perhaps', 658 | 'person', 659 | 'pet', 660 | 'pick', 661 | 'picket', 662 | 'picnic', 663 | 'picture', 664 | 'pie', 665 | 'piece', 666 | 'pig', 667 | 'pile', 668 | 'pin', 669 | 'place', 670 | 'plan', 671 | 'plant', 672 | 'play', 673 | 'pleasant', 674 | 'please', 675 | 'plenty', 676 | 'plow', 677 | 'point', 678 | 'poke', 679 | 'pole', 680 | 'policeman', 681 | 'pond', 682 | 'poor', 683 | 'pop', 684 | 'postman', 685 | 'pot', 686 | 'potato', 687 | 'pound', 688 | 'pour', 689 | 'practice', 690 | 'prepare', 691 | 'present', 692 | 'pretend', 693 | 'pretty', 694 | 'princess', 695 | 'prize', 696 | 'probably', 697 | 'problem', 698 | 'promise', 699 | 'protect', 700 | 'proud', 701 | 'puff', 702 | 'pull', 703 | 'puppy', 704 | 'push', 705 | 'put', 706 | 'q', 707 | 'queen', 708 | 'queer', 709 | 'quick', 710 | 'quiet', 711 | 'quite', 712 | 'r', 713 | 'rabbit', 714 | 'raccoon', 715 | 'race', 716 | 'radio', 717 | 'rag', 718 | 'rain', 719 | 'raise', 720 | 'ran', 721 | 'ranch', 722 | 'rang', 723 | 'reach', 724 | 'read', 725 | 'ready', 726 | 'real', 727 | 'red', 728 | 'refuse', 729 | 'remember', 730 | 'reply', 731 | 'rest', 732 | 'return', 733 | 'reward', 734 | 'rich', 735 | 'ride', 736 | 'right', 737 | 'ring', 738 | 'river', 739 | 'road', 740 | 'roar', 741 | 'rock', 742 | 'rode', 743 | 'roll', 744 | 'roof', 745 | 'room', 746 | 'rope', 747 | 'round', 748 | 'row', 749 | 'rub', 750 | 'rule', 751 | 'run', 752 | 'rush', 753 | 's', 754 | 'sad', 755 | 'safe', 756 | 'said', 757 | 'sail', 758 | 'sale', 759 | 'salt', 760 | 'same', 761 | 'sand', 762 | 'sang', 763 | 'sat', 764 | 'save', 765 | 'saw', 766 | 'say', 767 | 'scare', 768 | 'school', 769 | 'scold', 770 | 'scratch', 771 | 'scream', 772 | 'sea', 773 | 'seat', 774 | 'second', 775 | 'secret', 776 | 'see', 777 | 'seed', 778 | 'seem', 779 | 'seen', 780 | 'sell', 781 | 'send', 782 | 'sent', 783 | 'seven', 784 | 'several', 785 | 'sew', 786 | 'shadow', 787 | 'shake', 788 | 'shall', 789 | 'shape', 790 | 'she', 791 | 'sheep', 792 | 'shell', 793 | 'shine', 794 | 'ship', 795 | 'shoe', 796 | 'shone', 797 | 'shook', 798 | 'shoot', 799 | 'shop', 800 | 'shore', 801 | 'short', 802 | 'shot', 803 | 'should', 804 | 'show', 805 | 'sick', 806 | 'side', 807 | 'sight', 808 | 'sign', 809 | 'signal', 810 | 'silent', 811 | 'silly', 812 | 'silver', 813 | 'since', 814 | 'sing', 815 | 'sister', 816 | 'sit', 817 | 'six', 818 | 'size', 819 | 'skip', 820 | 'sky', 821 | 'sled', 822 | 'sleep', 823 | 'slid', 824 | 'slide', 825 | 'slow', 826 | 'small', 827 | 'smart', 828 | 'smell', 829 | 'smile', 830 | 'smoke', 831 | 'snap', 832 | 'sniff', 833 | 'snow', 834 | 'so', 835 | 'soft', 836 | 'sold', 837 | 'some', 838 | 'something', 839 | 'sometimes', 840 | 'son', 841 | 'song', 842 | 'soon', 843 | 'sorry', 844 | 'sound', 845 | 'speak', 846 | 'special', 847 | 'spend', 848 | 'spill', 849 | 'splash', 850 | 'spoke', 851 | 'spot', 852 | 'spread', 853 | 'spring', 854 | 'squirrel', 855 | 'stand', 856 | 'star', 857 | 'start', 858 | 'station', 859 | 'stay', 860 | 'step', 861 | 'stick', 862 | 'still', 863 | 'stone', 864 | 'stood', 865 | 'stop', 866 | 'store', 867 | 'story', 868 | 'straight', 869 | 'strange', 870 | 'street', 871 | 'stretch', 872 | 'strike', 873 | 'strong', 874 | 'such', 875 | 'sudden', 876 | 'sugar', 877 | 'suit', 878 | 'summer', 879 | 'sun', 880 | 'supper', 881 | 'suppose', 882 | 'sure', 883 | 'surprise', 884 | 'swallow', 885 | 'sweet', 886 | 'swim', 887 | 'swing', 888 | 't', 889 | 'table', 890 | 'tail', 891 | 'take', 892 | 'talk', 893 | 'tall', 894 | 'tap', 895 | 'taste', 896 | 'teach', 897 | 'teacher', 898 | 'team', 899 | 'tear', 900 | 'teeth', 901 | 'telephone', 902 | 'tell', 903 | 'ten', 904 | 'tent', 905 | 'than', 906 | 'thank', 907 | 'that', 908 | "that's", 909 | 'the', 910 | 'their', 911 | 'them', 912 | 'then', 913 | 'there', 914 | 'these', 915 | 'they', 916 | 'thick', 917 | 'thin', 918 | 'thing', 919 | 'think', 920 | 'third', 921 | 'this', 922 | 'those', 923 | 'though', 924 | 'thought', 925 | 'three', 926 | 'threw', 927 | 'through', 928 | 'throw', 929 | 'tie', 930 | 'tiger', 931 | 'tight', 932 | 'time', 933 | 'tiny', 934 | 'tip', 935 | 'tire', 936 | 'to', 937 | 'today', 938 | 'toe', 939 | 'together', 940 | 'told', 941 | 'tomorrow', 942 | 'too', 943 | 'took', 944 | 'tooth', 945 | 'top', 946 | 'touch', 947 | 'toward', 948 | 'tower', 949 | 'town', 950 | 'toy', 951 | 'track', 952 | 'traffic', 953 | 'train', 954 | 'trap', 955 | 'tree', 956 | 'trick', 957 | 'trip', 958 | 'trot', 959 | 'truck', 960 | 'true', 961 | 'trunk', 962 | 'try', 963 | 'turkey', 964 | 'turn', 965 | 'turtle', 966 | 'twelve', 967 | 'twin', 968 | 'two', 969 | 'u', 970 | 'ugly', 971 | 'uncle', 972 | 'under', 973 | 'unhappy', 974 | 'until', 975 | 'up', 976 | 'upon', 977 | 'upstairs', 978 | 'us', 979 | 'use', 980 | 'usual', 981 | 'v', 982 | 'valley', 983 | 'vegetable', 984 | 'very', 985 | 'village', 986 | 'visit', 987 | 'voice', 988 | 'w', 989 | 'wag', 990 | 'wagon', 991 | 'wait', 992 | 'wake', 993 | 'walk', 994 | 'want', 995 | 'war', 996 | 'warm', 997 | 'was', 998 | 'wash', 999 | 'waste', 1000 | 'watch', 1001 | 'water', 1002 | 'wave', 1003 | 'way', 1004 | 'we', 1005 | 'wear', 1006 | 'weather', 1007 | 'week', 1008 | 'well', 1009 | 'went', 1010 | 'were', 1011 | 'wet', 1012 | 'what', 1013 | 'wheel', 1014 | 'when', 1015 | 'where', 1016 | 'which', 1017 | 'while', 1018 | 'whisper', 1019 | 'whistle', 1020 | 'white', 1021 | 'who', 1022 | 'whole', 1023 | 'whose', 1024 | 'why', 1025 | 'wide', 1026 | 'wife', 1027 | 'will', 1028 | 'win', 1029 | 'wind', 1030 | 'window', 1031 | 'wing', 1032 | 'wink', 1033 | 'winter', 1034 | 'wire', 1035 | 'wise', 1036 | 'wish', 1037 | 'with', 1038 | 'without', 1039 | 'woke', 1040 | 'wolf', 1041 | 'woman', 1042 | 'women', 1043 | "won't", 1044 | 'wonder', 1045 | 'wood', 1046 | 'word', 1047 | 'wore', 1048 | 'work', 1049 | 'world', 1050 | 'worm', 1051 | 'worry', 1052 | 'worth', 1053 | 'would', 1054 | 'wrong', 1055 | 'x', 1056 | 'y', 1057 | 'yard', 1058 | 'year', 1059 | 'yell', 1060 | 'yellow', 1061 | 'yes', 1062 | 'yet', 1063 | 'you', 1064 | 'young', 1065 | 'your', 1066 | 'z', 1067 | 'zoo' 1068 | ] 1069 | -------------------------------------------------------------------------------- /license: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2014 Titus Wormer 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | 'Software'), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "spache", 3 | "version": "2.0.1", 4 | "description": "List of simple American-English words: The Revised Spache (1974)", 5 | "license": "MIT", 6 | "keywords": [ 7 | "spache", 8 | "word", 9 | "list" 10 | ], 11 | "repository": "words/spache", 12 | "bugs": "https://github.com/words/spache/issues", 13 | "funding": { 14 | "type": "github", 15 | "url": "https://github.com/sponsors/wooorm" 16 | }, 17 | "author": "Titus Wormer (https://wooorm.com)", 18 | "contributors": [ 19 | "Titus Wormer (https://wooorm.com)" 20 | ], 21 | "sideEffects": false, 22 | "type": "module", 23 | "main": "index.js", 24 | "types": "index.d.ts", 25 | "files": [ 26 | "index.d.ts", 27 | "index.js" 28 | ], 29 | "devDependencies": { 30 | "@types/node": "^18.0.0", 31 | "c8": "^7.0.0", 32 | "hast-util-from-html": "^1.0.0", 33 | "hast-util-select": "^5.0.0", 34 | "hast-util-to-string": "^2.0.0", 35 | "node-fetch": "^3.0.0", 36 | "prettier": "^2.0.0", 37 | "remark-cli": "^11.0.0", 38 | "remark-preset-wooorm": "^9.0.0", 39 | "type-coverage": "^2.0.0", 40 | "typescript": "^4.0.0", 41 | "xo": "^0.52.0" 42 | }, 43 | "scripts": { 44 | "prepack": "npm run build && npm run format", 45 | "generate": "node build.js", 46 | "build": "tsc --build --clean && tsc --build && type-coverage", 47 | "format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix", 48 | "test-api": "node --conditions development test.js", 49 | "test-coverage": "c8 --check-coverage --100 --reporter lcov npm run test-api", 50 | "test": "npm run build && npm run format && npm run test-coverage" 51 | }, 52 | "prettier": { 53 | "tabWidth": 2, 54 | "useTabs": false, 55 | "singleQuote": true, 56 | "bracketSpacing": false, 57 | "semi": false, 58 | "trailingComma": "none" 59 | }, 60 | "xo": { 61 | "prettier": true 62 | }, 63 | "remarkConfig": { 64 | "plugins": [ 65 | "preset-wooorm" 66 | ] 67 | }, 68 | "typeCoverage": { 69 | "atLeast": 100, 70 | "detail": true, 71 | "strict": true 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # spache 2 | 3 | [![Build][build-badge]][build] 4 | [![Coverage][coverage-badge]][coverage] 5 | [![Downloads][downloads-badge]][downloads] 6 | [![Size][size-badge]][size] 7 | 8 | List of familiar American-English words: [Revised Spache (1974)][wiki]. 9 | 10 | ## Contents 11 | 12 | * [What is this?](#what-is-this) 13 | * [When should I use this?](#when-should-i-use-this) 14 | * [Install](#install) 15 | * [Use](#use) 16 | * [API](#api) 17 | * [`spache`](#spache-1) 18 | * [Data](#data) 19 | * [Types](#types) 20 | * [Compatibility](#compatibility) 21 | * [Related](#related) 22 | * [Contribute](#contribute) 23 | * [Security](#security) 24 | * [License](#license) 25 | 26 | ## What is this? 27 | 28 | This package exposes a list of familiar words. 29 | 30 | ## When should I use this? 31 | 32 | Use this when you want to do readability things with natural language. 33 | 34 | Use [`spache-formula`][spache-formula] for the formula. 35 | 36 | Alternatively, you can use [`dale-chall`][dale-chall], which has more words 37 | (about 3 000) and is more recent (1995). 38 | 39 | ## Install 40 | 41 | This package is [ESM only][esm]. 42 | In Node.js (version 14.14+, 16.0+), install with [npm][]: 43 | 44 | ```sh 45 | npm install spache 46 | ``` 47 | 48 | In Deno with [`esm.sh`][esmsh]: 49 | 50 | ```js 51 | import {spache} from 'https://esm.sh/spache@2' 52 | ``` 53 | 54 | In browsers with [`esm.sh`][esmsh]: 55 | 56 | ```html 57 | 60 | ``` 61 | 62 | ## Use 63 | 64 | ```js 65 | import {spache} from 'spache' 66 | 67 | spache.length //=> 1063 68 | 69 | console.log(spache.slice(0, 10)) 70 | ``` 71 | 72 | Yields: 73 | 74 | ```js 75 | [ 'a', 76 | 'able', 77 | 'about', 78 | 'above', 79 | 'across', 80 | 'act', 81 | 'add', 82 | 'afraid', 83 | 'after', 84 | 'afternoon' ] 85 | ``` 86 | 87 | ## API 88 | 89 | This package exports the identifier `spache`. 90 | There is no default export. 91 | 92 | ### `spache` 93 | 94 | List of strings (`Array`). 95 | 96 | ## Data 97 | 98 | See [Perera, Katherine. *Linguistic Difficulty in 99 | Reading Material.* (Linguistics and the Teacher. Vol. 112)][book]. 100 | 101 | ## Types 102 | 103 | This package is fully typed with [TypeScript][]. 104 | It exports no additional types. 105 | 106 | ## Compatibility 107 | 108 | This package is at least compatible with all maintained versions of Node.js. 109 | As of now, that is Node.js 14.14+ and 16.0+. 110 | It also works in Deno and modern browsers. 111 | 112 | ## Related 113 | 114 | * [`spache-formula`][spache-formula] 115 | — formula to detect the grade level of text according 116 | * [`dale-chall`][dale-chall] 117 | — list of easy American-English words: new Dale–Chall (1995) 118 | 119 | ## Contribute 120 | 121 | Yes please! 122 | See [How to Contribute to Open Source][contribute]. 123 | 124 | ## Security 125 | 126 | This package is safe. 127 | 128 | ## License 129 | 130 | [MIT][license] © [Titus Wormer][author] 131 | 132 | 133 | 134 | [build-badge]: https://github.com/words/spache/workflows/main/badge.svg 135 | 136 | [build]: https://github.com/words/spache/actions 137 | 138 | [coverage-badge]: https://img.shields.io/codecov/c/github/words/spache.svg 139 | 140 | [coverage]: https://codecov.io/github/words/spache 141 | 142 | [downloads-badge]: https://img.shields.io/npm/dm/spache.svg 143 | 144 | [downloads]: https://www.npmjs.com/package/spache 145 | 146 | [size-badge]: https://img.shields.io/bundlephobia/minzip/spache.svg 147 | 148 | [size]: https://bundlephobia.com/result?p=spache 149 | 150 | [npm]: https://docs.npmjs.com/cli/install 151 | 152 | [esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c 153 | 154 | [esmsh]: https://esm.sh 155 | 156 | [typescript]: https://www.typescriptlang.org 157 | 158 | [contribute]: https://opensource.guide/how-to-contribute/ 159 | 160 | [license]: license 161 | 162 | [author]: https://wooorm.com 163 | 164 | [wiki]: https://en.wikipedia.org/wiki/Spache_readability_formula 165 | 166 | [book]: https://books.google.com/books?id=oNXFQ9Gn6XIC&pg=PA106&lpg=PA106 167 | 168 | [spache-formula]: https://github.com/words/spache-formula 169 | 170 | [dale-chall]: https://github.com/words/dale-chall 171 | -------------------------------------------------------------------------------- /test.js: -------------------------------------------------------------------------------- 1 | import assert from 'node:assert' 2 | import test from 'node:test' 3 | import {spache} from './index.js' 4 | 5 | test('spache', function () { 6 | assert.equal(typeof spache, 'object', 'should be an array #1') 7 | assert.equal(Array.isArray(spache), true, 'should be an array #2') 8 | assert.notEqual(spache.indexOf('train'), -1, 'should contain words') 9 | assert.notEqual(spache.indexOf("can't"), -1, "should contain can't") 10 | assert.equal(spache.indexOf("aren't"), -1, "should not contain aren't") 11 | }) 12 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "include": ["**/**.js"], 3 | "exclude": ["coverage", "node_modules"], 4 | "compilerOptions": { 5 | "checkJs": true, 6 | "declaration": true, 7 | "emitDeclarationOnly": true, 8 | "exactOptionalPropertyTypes": true, 9 | "forceConsistentCasingInFileNames": true, 10 | "lib": ["es2020"], 11 | "module": "node16", 12 | "newLine": "lf", 13 | "skipLibCheck": true, 14 | "strict": true, 15 | "target": "es2020" 16 | } 17 | } 18 | --------------------------------------------------------------------------------