Skip to content

Latest commit

 

History

History
345 lines (172 loc) · 4 KB

README.md

File metadata and controls

345 lines (172 loc) · 4 KB

Min.js Documentation

Min.js is a lightweight JavaScript library that provides shorthand notations for commonly used keywords and function names, resulting in reduced file sizes and improved execution speed. This documentation provides a comprehensive list of all the abbreviations available in Min.js and includes tutorials on how to use them effectively.

Example Code

Here's an example code snippet that demonstrates the usage of Min.js abbreviations:

c ie = r('iefw-native');

c iec = new ie();

c file = './path/to/file';

iec.uploadFile(file)

  .then((fileUrl) => {

    cs.lo('File uploaded successfully!');

    cs.lo('File URL', fileUrl);

  })

  .catch((error) => {

    cs.er('An error occurred while uploading the file:', error);

  });

In the above example, the code uses the following Min.js abbreviations:

  • c for const

  • r for require

  • cs for console

  • lo for log

  • er for error

These abbreviations help make the code more concise and easier to read.

Abbreviations

Min.js provides the following abbreviations for common JavaScript keywords and function names:

Abbreviation | Full Keyword or Function Name

------------ | ---------------------------

c | const

v | var

r | require

cs | console

f | function

m | module

ex | exports

rf | readFileSync

wfs | writeFileSync

p | process

a | Array

o | Object

prom | Promise

se | setInterval

si | setTimeout

fe | forEach

pr | prototype

pu | push

sl | slice

jo | join

st | startsWith

en | endsWith

su | substring

co | concat

in | includes

ma | map

fi | filter

ev | every

so | sort

re | reduce

pr | print

rea | read

wr | write

len | length

sp | split

pa | parse

str | stringify

ch | charAt

cod | codePointAt

repl | replace

mat | match

tri | trim

low | toLowerCase

upp | toUpperCase

def | defineProperty

des | descriptor

obj | Object

gop | getOwnPropertyNames

ca | call

ap | apply

new | new

pro | prototype

has | hasOwnProperty

fun | Function

ar | arguments

iof | indexOf

bof | Buffer.from

bos | Buffer.alloc

pi | parseInt

ps | parseFloat

ts | toString

join | join

ars | Array.isArray

tasi | Array.from

sl | slice

arr | Array

fl | fill

co | copyWithin

ent | entries

so | sort

pop | pop

pus | push

rev | reverse

sh | shift

un | unshift

con | concat

of | indexOf

jo | join

sp | splice

ev | every

fi | filter

fin | find

fiin | findIndex

for | forEach

inc | includes

ind | indexOf

las | lastIndexOf

map | map

re | reduce

rem | reduceRight

som | some

fil | fill

so | sort

sl | slice

tox | toLocaleString

tos | toString

val | valueOf

ma | Math

ra | random

ab | abs

ce | ceil

fl | floor

ma | max

mi | min

ro | round

sq | sqrt

po | pow

ran | random

ranf | randomFillSync

rans | randomFill

ranb | randomBytes

si | sign

siZ | signbit

tr | trunc

cl | clearImmediate

sti | setImmediate

cin | clearInterval

ini | setInterval

cota | clearTimeout

iniT | setTimeout

co | console

ti | time

tie | timeEnd

clc | clear

wa | warn

er | error

in | info

de | dir

di | dirxml

co | count

as | assert

tr | trace

trw | traceWarnings

ta | table

gr | group

gre | groupEnd

grc | groupCollapsed

co | console

de | debug

lo | log

in | info

wa | warn

er | error

Please note that these abbreviations are designed for convenience and brevity and may not be suitable for all programming contexts. It's important to use them judiciously and ensure that your code remains readable and maintainable.