1.2.2 • Published 6 months ago

nflcodelab v1.2.2

Weekly downloads
-
License
MIT
Repository
-
Last release
6 months ago

NFL CodeLab

NFL CodeLab is your playbook for coding, transforming NFL terminology into JavaScript code. Take your coding game to the championship level with this one-of-a-kind syntax.

Designed for football fans, this language brings the excitement of the NFL to your development process, letting you craft JavaScript code using football-inspired terms.

Game-Changing Features

  • Draft JavaScript code with NFL terms and idioms.
  • Call the perfect play with seamless integration into modern frameworks like React and Vite.
  • Execute .nfl files with ease.
  • Switch formations effortlessly by converting between JavaScript and NFL syntax.
  • Level up your playbook with a Visual Studio Code extension for syntax highlighting.

Playbook Example

// NFL CodeLab
draft player assign jersey { name: 'Tom Brady', jersey number: 12, stats: { touchdowns: 700, yards: 84000 } };

here we gooo blue80() fieldStart
  instant replay (player.stats.touchdowns MVP rank 600) {
    commentator(player.name gain yards " is MVP!");
  } timeout {
    commentator(player.name gain yards " needs more practice.");
  }
fieldEnd

blue80();


// Regular JavaScript
let player = { name: 'Tom Brady', key: 12, stats: { touchdowns: 700, yards: 84000 } };

function blue80() {
  if (player.stats.touchdowns > 600) {
    console.log(player.name + " is MVP!");
  } else {
    console.log(player.name + " needs more practice.");
  }
}

blue80();

Installation

Via npm

Install NFL CodeLab globally with npm:

$ npm install -g nflcodelab

Run the .nfl:

$ superbowl ./folder/filename.nfl

Uninstallation

To uninstall:

$ npm uninstall -g nflcodelab

Playbook Terminology

Below is a table of standard JavaScript keywords or operators and their NFL CodeLab equivalents:

NFL CodeLabJavaScript Equivalent
Functionality
draftlet
contractconst
free agent invitevar
here we gooofunction
passreturn
instant replayif
timeoutelse
game strategyswitch
play callcase
full blitzfor
two-minute drillwhile
field goal attemptdo
quarterback sneaktry
interceptioncatch
fumblethrow
omahabreak
franchiseclass
head coachconstructor
rookie contractnew
current seasonthis
player archetypeprototype
no huddleasync
play clockawait
tradeimport
transferexport
superbowldefault
injury timeoutnull
no roster spotundefined
wintrue
lossfalse
incompleteNaN
scouting reporttypeof
free agentinstanceof
React-related keywords
starting lineup<Component>
player statsprops
game conditionstate
momentum shiftuseState
play adjustmentsuseEffect
call timeout to adjustsetState
review boothref
jersey numberkey
locker roomcontext
bench playerschildren
play executionrender
formation setupReact.Fragment
HTML/JSX Keywords
stadium<div
stadiumEnd</div>
headline<h1>
headlineEnd</h1>
subheadline<h2>
subheadlineEnd</h2>
scoreboard<p>
scoreboardEnd</p>
player list<ul>
playerListEnd</ul>
player stat<li>
playerStatEnd</li>
game field<table>
gameFieldEnd</table>
field zone<thead>
fieldZoneEnd</thead>
field play<tbody>
fieldPlayEnd</tbody>
field record<tr>
fieldRecordEnd</tr>
player record<td>
playerRecordEnd</td>
caption booth<caption>
captionBoothEnd</caption>
text input<input>
textInputEnd</input>
game button<button>
gameButtonEnd</button>
dropdown menu<select>
dropdownMenuEnd</select>
menu option<option>
menuOptionEnd</option>
image replay<img>
imageReplayEnd</img>
game link<a>
gameLinkEnd</a>
line separator<hr>
lineSeparatorEnd</hr>
stats block<pre>
statsBlockEnd</pre>
stats section<section>
statsSectionEnd</section>
team formation<form>
teamFormationEnd</form>
highlight area<mark>
highlightAreaEnd</mark>
player bio<span>
playerBioEnd</span>
play card<article>
playCardEnd</article>
footer zone<footer>
footerZoneEnd</footer>
header zone<header>
headerZoneEnd</header>
team logo<svg>
teamLogoEnd</svg>
player jersey<label>
playerJerseyEnd</label>
hidden play<hidden>
hiddenPlayEnd</hidden>
quote analysis<blockquote>
quoteAnalysisEnd</blockquote>
play alert<strong>
playAlertEnd</strong>
team motto<em>
teamMottoEnd</em>
code breakdown<code>
codeBreakdownEnd</code>
play diagram<canvas>
playDiagramEnd</canvas>
Assignment and comparisons
assign jersey=
check teammate==
exact match in stats===
gain yards+
lose yards-
touchdown*
divide possessions/
field goal percentage%
teamwork&&
defensive stop!
MVP rank>
rookie rank<
playoff contender>=
draft lottery contender<=
Modifying values
add to score+=
subtract from score-=
yardage gain++
yardage loss--
Conditional expressions
challenge flag?
play result:
Code structure
fieldStart{
fieldEnd}
Array Methods
commentatorconsole.log
pushpush
poppop
shiftshift
unshiftunshift
sliceslice
splicesplice
mapmap
filterfilter
reducereduce
forEachforEach
findfind
findIndexfindIndex
somesome
everyevery
concatconcat
includesincludes
indexOfindexOf
joinjoin
reversereverse
sortsort
flatflat
flatMapflatMap

Unleash the power of the NFL on your JavaScript projects today!

1.2.2

6 months ago

1.2.1

6 months ago

1.2.0

6 months ago

1.1.9

6 months ago

1.1.8

6 months ago

1.1.7

6 months ago

1.1.6

6 months ago

1.1.5

6 months ago

1.1.4

6 months ago

1.1.3

6 months ago

1.1.2

6 months ago

1.1.1

6 months ago

1.1.0

6 months ago

1.0.9

6 months ago

1.0.8

6 months ago

1.0.7

6 months ago

1.0.6

6 months ago

1.0.5

6 months ago