2.0.16 • Published 1 year ago

@kollorg/officia-explicabo v2.0.16

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

@kollorg/officia-explicabo 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('@kollorg/officia-explicabo');
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.

privateloggingECMAScript 2020regexpyupsearchspecnumberdataObject.fromEntriesbabel-corecoreasciiisConcatSpreadableprotocol-bufferssidetrimLeftsyntaxsetbufferfixed-widthshrinkwraptoolkitexecutestreamsguidsymlinkselectronfunctionalglobal objectgroupByhelpercloudwatchfast-deep-cloneObjectfast-copyUnderscorevestRxmulti-packagespinnersObservableweakmapshebangforEacheslintplugintraversetestYAMLwaapifsregular-expressionroutingStreampostcss-plugintsESdeletejapaneselanguageStyleSheetcoverageweaksetSystem.globalUint16ArrayforkconfigstableArray.prototype.containsarraybufferautoscalinglastentriesrequirefilees5idassertsES2016ES3inspectInt8ArraybrowserartdeepcopyhttpsserializemodulesxtermprettydirmatchessyntaxerrortrimdescriptorcloudformationuuidconsttouchUint8Array6to5directorypathrmdiriamscheme-validationbusyvalidationFunction.prototype.namechromiumArray.prototype.filterisObject.getPrototypeOfasterisksObject.valuesTypeBoxutilcall-boundquerystringECMAScript 2023createchecktranspilerhashqueueECMAScript 2019htmlECMAScript 2018resolveECMAScript 2015pino.gitignoreES2015make dirperformancefastcloneimportexportURLSearchParamstoArrayfullwidthatomqueueMicrotaskistanbulECMAScript 6maketostringtagdependenciesoutputcopycacheebspropertiesletefficientESnextterminalkeydragECMAScriptregexvisualcjki18nSymbolsymbolargstypeerrorawesomesaucewritepackage.jsonMapjsonecmascriptgraphqlcomparejsdomglobalsdropshellcharacterObject.assignurlarktyperamdaRxJSreact poseTypeScriptlengthRegExp.prototype.flagsconcatMapcore-jswafJSONfunctionstextvarSetrapidjsonschemafindLastIndexObject.entriespopmotionexpressiontakewidthmatchvalidateES2019BigUint64Arrayfindroute53snsponyfilljasminequeryclassnamepackagesloadingconsoleobjectrdstestereslint-pluginrecursivepnpm9bannerRegExp#flagschineseacornfnmatchrouterfilterastreversedenvpreprocessoraccessibilitymkdirsreducerstarterECMAScript 2022IteratorparsewarningclasseseventDispatcherassertcolourkinesistc39dataviewECMAScript 5cssglobalpolyfillbddArray.prototype.flatMaptoReversedworkflowECMAScript 33dcloudfrontdeep-copyhas-ownFloat64Arraylibphonenumbercss-in-jsextendansijsenvironmentsES6sharedgroupsortsimpledbgetdeterministicprotoReactiveXgetPrototypeOfmonorepohelpersES8proxybuffersfunction.lengthboundoptionnativeesfastifywgetECMAScript 2016Symbol.toStringTaglocaltermprivate dataeventEmitterjson-schema-validatorcollection.es6zodString.prototype.trimexpressiteratees-shimsdependency managerespreees7real-timenodees2018find-upasyncuser-streamssortedjson-schemasetImmediateclass-validatorpropeast-asian-widthxmlcallbackeslintWebSocketswhatwgworkspace:*avahookformdominpatch256emitsetPrototypeOfFloat32ArrayslotimmerfpposeES2018getintrinsicsuperstructmomentagentAsyncIteratorspawnpushtapArray.prototype.flatvalueapiWeakMapES2020fast-clonecallbindwaittrimEndinvariantpackagetoStringTagimportjshintincludesassertionpackage managercolumnstapeglacierinstallprunebinaryutilityjavascriptrequestlockfileUint8ClampedArrayzxemojiObservablestddstructuredClonecomputed-typeslistenersconcatautoprefixerspeedidlejQuerypropertydataViewtrimRightbundlingcurriedsymbolsECMAScript 2017gitignorefeedarraysstylingUint32Arrayawseffect-tschildredactglobalThisJSON-Schemafetchnodejseverynpmignoreinternal sloterrorArray.prototype.includesreactsesiecollection-0typeofdatejoia11yreduxrestfulimmutabletoSortedairbnbBigInt64Arrayfullcharacterses2015toolsES2023formsworkercloudtrailgenericstypesArray.prototype.flattenWeakSetURLenumerableInt32ArrayinternalstylesconfigurablecompilerflattenajaxsuperagentArrayBuffermoveequal__proto__clishamdotenvtranspilestringifierArray.prototype.findLastCSSStyleDeclarationcolordynamodbprocessprototypeeventsgdprtestingaccessorintrinsicruntimeregular expressiondayjsspinnercircularflaghardlinkssqsfindupfile systemString.prototype.matchAllmrustoragegatewaydescriptionframercurlreworkflatInt16Arrayfunctionfastcopywalkingreact-testing-libraryhttptypedarrayses8parentinstallerreact-hook-formes2016channelcolumnexecfileStreamscoerciblees-shim APIstyled-componentsnpmstringifyvpcignoredefinebabelpoint-freebytenegativergbPushflatMapschemebinariesescapeparentstoobjectmochaestreejsdiffindicatordeepclonevariablesES5call-bindrangeerrorprefixes6karmafromtslibcontains@@toStringTagRFC-6455mapreduceinferenceharmonyES7shimglobal this valueendpointbyteLengthobjcommanderfpsrobustgetOwnPropertyDescriptorvalidatorqshookselboffsetWebSocketmanipulationdiffes-abstractbeanstalkTypedArraybundlercallboundmapECMAScript 7CSSdom-testing-librarythreesetterES2017ArrayBuffer#sliceelasticache
2.0.16

1 year ago

2.0.15

1 year ago

2.0.14

1 year ago

2.0.13

1 year ago

2.0.12

1 year ago

2.0.11

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