2.10.81 • Published 1 year ago

@hishprorg/sit-ad v2.10.81

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@hishprorg/sit-ad Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

Get and robustly cache all JS language-level intrinsics at first require time.

See the syntax described in the JS spec for reference.

Example

var GetIntrinsic = require('@hishprorg/sit-ad');
var assert = require('assert');

// static methods
assert.equal(GetIntrinsic('%Math.pow%'), Math.pow);
assert.equal(Math.pow(2, 3), 8);
assert.equal(GetIntrinsic('%Math.pow%')(2, 3), 8);
delete Math.pow;
assert.equal(GetIntrinsic('%Math.pow%')(2, 3), 8);

// instance methods
var arr = [1];
assert.equal(GetIntrinsic('%Array.prototype.push%'), Array.prototype.push);
assert.deepEqual(arr, [1]);

arr.push(2);
assert.deepEqual(arr, [1, 2]);

GetIntrinsic('%Array.prototype.push%').call(arr, 3);
assert.deepEqual(arr, [1, 2, 3]);

delete Array.prototype.push;
GetIntrinsic('%Array.prototype.push%').call(arr, 4);
assert.deepEqual(arr, [1, 2, 3, 4]);

// missing features
delete JSON.parse; // to simulate a real intrinsic that is missing in the environment
assert.throws(() => GetIntrinsic('%JSON.parse%'));
assert.equal(undefined, GetIntrinsic('%JSON.parse%', true));

Tests

Simply clone the repo, npm install, and run npm test

Security

Please email @ljharb or see https://tidelift.com/security if you have a potential security vulnerability to report.

route53Array.prototype.flatMapreducedirectorydotenvperformanceaccessorinstallerkeyelbshellnegativeObservablevaluesglacierjapaneseelasticachefunctionsruntimes3bindcloudsearchgdprtypeerrorloggerpackagestexthookformajaxassignes5propertiesfilestringObject.fromEntriesinstrumentationeslintconfigatommkdirplookoutputInt32Arrayponyfillparsewaitmkdirsregular expressionsnscolorsES2018real-timeInt8Arraybeanstalkchinesees-shim APItypesafezodtrimStartrobustspeedlintjson-schema-validationprotocol-buffersbyteLengthECMAScript 5assertdomutil.inspectES2020descriptiontestertypeofArrayBuffer.prototype.slicequeueRxJSdayjspluginrgbJSONyupStreamecmascriptHyBiquotemobilespinnersartfull-widthtakeECMAScript 2022someURLSearchParamsweakmapidentifiersReflect.getPrototypeOfPushhas-ownuninstallredacttimepathbuffersArrayArray.prototype.flatpicomatchbinObject.isdeepcopyyamldeep-clonesidepatchObservablestslibec2mkdirgitignoreES2022typedarray[[Prototype]]rsstoolsES2021callbindFloat64Arraytoobjectdiffboundbabel-coreform-validationserializeuser-streamsqstranspilersyntaxerrorcomputed-typesfigletfast-deep-clonemocha256joiclass-validatorcommanderreadablestreamTypeBoxhttpsloglistenersprototypeawssearchglobalThisidleterminalbabelECMAScript 2015regularfullrm -rfendpointbinarypinostream3dtsswfcreatemoduleString.prototype.matchAlloptimizervisualautoprefixerStyleSheetregexUint8Arrayl10nspawntc39mrusymbolFloat32ArrayassertionrestpreprocessorredirectprunenameUint16ArraywebtestingbrowserslistAsyncIteratorproxykinesisstarterES8debuggerchannelcolourviewexecutetrimEndsetgenericsfast-deep-copycjkcloudfrontSymbolwhichhttpstreamsgetintrinsictypescriptdescriptortyped@@toStringTagfunctionalserializationdefinePropertysameValueZerorapid6to5globalspolyfillenumerablevestasciistylingbannertransportanimationgetOwnPropertyDescriptorreact-hook-formnumberTypeScriptmapreduceescapelengthObject.assignminimalappcomparebundlerreverseflatMapsetPrototypeOfgraphqles-shimsutilitiesdataxhrunicodetraverse0prefixvalidURLworkspace:*regular-expressionprettyRegExp#flagsUnderscorecommandconsoleproto_.extendsortrestfuleffect-tsvalidationsubprocessdropramdacopyautoscalinges6objectconcatMapconfigurableprogresssortedpyyamliteratorECMAScript 2017zxschemaargumentefficientelectronlinkframerforktapegetbddcalllastcallboundwarningES3awesomesauceajvwritableoffsetnopeCSSStyleDeclarationSetsharedarraybufferreworktddRFC-6455$.extendESnextimmutableworkerarraybuffersettingsBigInt64Arraytacitwalkprocesspostcss-pluginreact posestyledatefindLastMapconcatexecfilerm -frmake dires8serializeres2017airbnbebsistanbulFunction.prototype.nameestreeisinternalECMAScript 7agentchrometypanionObject.keysmodulesmomentglobal objectcloudtrailbrowserlistcore-jsTypedArrayinvariantdeep-copyeslint-pluginSystem.globalrulesreact-testing-librarylocationObjecturloptioninputlanguagecoverageclassnamewritenodedataviewdeterministicttyoptimistfantasy-landastcliregular expressionstrimLeftframeworkhigher-ordertrimquerynpmignorefastasyncformattingutilES5ArrayBuffer#slicees-abstractspecmatchAlldynamodbonceslicerangeerrorsource mappoint-freebrowserzeroslotansi.gitignoremanagerstringifyeast-asian-widthfind-upaccessibilityinternal slotjson-schemaclassesflagsreducerYAMLdependency managercurrieddebugglobal this valuenpmloadbalancingmonorepoarktypebusyECMAScript 3incollection.es6shrinkwrapxmlcircularwafsafeposeomitdragmoverandomreuseconstrouterchildimportexporthasOwnpopmotiondeeplrufindLastIndexcolumnsymbolssyntaxvpcconfigargvcachecss-in-jsuuidextendObject.values__proto__ownroutingpackagecryptogetoptgesturessymlinkschromiumhasOwnPropertyclassnamesstoragegatewaydataViewes2016ES7threeglobreduxwalkingtapasterisksarraygroupBybyteOffsetReactiveXnativecloneStreamses2015windowSymbol.toStringTaghardlinksjsxweaksetECMAScript 2016look-upupfastifykarmajsdomexecwidthES2019utilityfps
2.10.81

1 year ago

2.10.80

1 year ago

2.10.79

1 year ago

2.10.78

1 year ago

2.10.77

1 year ago

2.10.76

1 year ago

2.9.76

1 year ago

2.9.75

1 year ago

2.9.74

1 year ago

2.9.73

1 year ago

2.9.72

1 year ago

2.9.71

1 year ago

2.8.71

1 year ago

2.8.70

1 year ago

2.8.69

1 year ago

2.8.68

1 year ago

2.8.67

1 year ago

2.8.66

1 year ago

2.8.65

1 year ago

2.8.64

1 year ago

2.8.63

1 year ago

2.8.62

1 year ago

2.8.61

1 year ago

2.8.60

1 year ago

2.8.59

1 year ago

2.8.58

1 year ago

2.8.57

1 year ago

2.8.56

1 year ago

2.8.55

1 year ago

2.8.54

1 year ago

2.8.53

1 year ago

2.8.52

1 year ago

2.8.51

1 year ago

2.8.50

1 year ago

2.8.49

1 year ago

2.8.48

1 year ago

2.8.47

1 year ago

2.8.46

1 year ago

2.8.45

1 year ago

2.7.45

1 year ago

2.7.44

1 year ago

2.7.43

1 year ago

2.7.42

1 year ago

2.7.41

1 year ago

1.7.41

1 year ago

1.7.40

1 year ago

1.7.39

1 year ago

1.7.38

1 year ago

1.7.37

1 year ago

1.7.36

1 year ago

1.7.35

1 year ago

1.7.34

1 year ago

1.6.34

1 year ago

1.5.34

1 year ago

1.5.33

1 year ago

1.5.32

1 year ago

1.5.31

1 year ago

1.4.31

1 year ago

1.4.30

1 year ago

1.4.29

1 year ago

1.4.28

1 year ago

1.4.27

1 year ago

1.4.26

1 year ago

1.4.25

1 year ago

1.4.24

1 year ago

1.4.23

1 year ago

1.3.23

1 year ago

1.3.22

1 year ago

1.3.21

1 year ago

1.3.20

1 year ago

1.3.19

1 year ago

1.3.18

1 year ago

1.3.17

1 year ago

1.2.17

1 year ago

1.2.16

1 year ago

1.1.16

1 year ago

1.1.15

1 year ago

1.1.14

1 year ago

1.1.13

1 year ago

1.1.12

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago