nv-facutil-operator
- nv-facutil-operator make a function for each operator(except AssignExpression related)
- it could be used when you need to dynamically batch generate many functions ,when by-manual is impossible(for exzample 10k+)
- use it along-with tool such as babel,make your script powerful
- normally it is USELESS
install
- npm install nv-facutil-operator
usage
example
const fac_op = require("nv-facutil-operator")
> fac_op
{
add: [Function: add],
band: [Function: band],
bnot: [Function: bnot],
bor: [Function: bor],
bxor: [Function: bxor],
comma: [Function: comma],
ternary: [Function: ternary],
div: [Function: div],
deq: [Function: deq],
teq: [Function: teq],
power: [Function: power],
gt: [Function: gt],
'$in': [Function: $in],
ge: [Function: ge],
dneq: [Function: dneq],
tneq: [Function: tneq],
'$instanceof': [Function: $instanceof],
lshift: [Function: lshift],
lt: [Function: lt],
le: [Function: le],
land: [Function: land],
lnot: [Function: lnot],
lor: [Function: lor],
mul: [Function: mul],
rem: [Function: rem],
rshift: [Function: rshift],
sub: [Function: sub],
'$typeof': [Function: $typeof],
plus: [Function: plus],
neg: [Function: neg],
urshift: [Function: urshift],
'$void': [Function: $void],
nc: [Function: nc],
'+': [Function: plus],
'&': [Function: band],
'~': [Function: bnot],
'|': [Function: bor],
'^': [Function: bxor],
',': [Function: comma],
'?:': [Function: ternary],
'/': [Function: div],
'==': [Function: deq],
'===': [Function: teq],
'**': [Function: power],
'>': [Function: gt],
in: [Function: $in],
'>=': [Function: ge],
'!=': [Function: dneq],
'!==': [Function: tneq],
instanceof: [Function: $instanceof],
'<<': [Function: lshift],
'<': [Function: lt],
'<=': [Function: le],
'&&': [Function: land],
'!': [Function: lnot],
'||': [Function: lor],
'*': [Function: mul],
'%': [Function: rem],
'>>': [Function: rshift],
'-': [Function: neg],
typeof: [Function: $typeof],
'>>>': [Function: urshift],
void: [Function: $void],
'??': [Function: nc],
NAMES: {
add: '+',
band: '&',
bnot: '~',
bor: '|',
bxor: '^',
comma: ',',
ternary: '?:',
div: '/',
deq: '==',
teq: '===',
power: '**',
gt: '>',
'$in': 'in',
ge: '>=',
dneq: '!=',
tneq: '!==',
'$instanceof': 'instanceof',
lshift: '<<',
lt: '<',
le: '<=',
land: '&&',
lnot: '!',
lor: '||',
mul: '*',
rem: '%',
rshift: '>>',
sub: '-',
'$typeof': 'typeof',
plus: '+',
neg: '-',
urshift: '>>>',
'$void': 'void',
nc: '??',
'+': 'plus',
'&': 'band',
'~': 'bnot',
'|': 'bor',
'^': 'bxor',
',': 'comma',
'?:': 'ternary',
'/': 'div',
'==': 'deq',
'===': 'teq',
'**': 'power',
'>': 'gt',
in: '$in',
'>=': 'ge',
'!=': 'dneq',
'!==': 'tneq',
instanceof: '$instanceof',
'<<': 'lshift',
'<': 'lt',
'<=': 'le',
'&&': 'land',
'!': 'lnot',
'||': 'lor',
'*': 'mul',
'%': 'rem',
'>>': 'rshift',
'-': 'neg',
typeof: '$typeof',
'>>>': 'urshift',
void: '$void',
'??': 'nc'
}
}
>
LICENSE