1.0.0 • Published 1 year ago

@f1stnpm2/eaque-consequuntur-unde v1.0.0

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

@f1stnpm2/eaque-consequuntur-unde 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('@f1stnpm2/eaque-consequuntur-unde');
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.

classnamesshamoptionresolvecryptospectraverseremove0rangeerroryamllazytrimLeftexpressexecirqawaitconsumerobustautoscalingvestreal-timecss-in-jsbluebirdhasOwnjwtObject.keysidinspectredux-toolkitWeakMapwatchbundlingconcatqueuestatesomeiterationcodesmimetypesruntimewhatwgdeepmatchAllairbnbcollection.es6terminalECMAScript 2016stringifierproxyexpressiones6streamcorewgetbyteOffsetcompilerreadablestreamoptimizersequencevisualfile systemlibphonenumberelectronsymlinkslookBigUint64Arrayjoidebugnodejsless mixinssyntaxerrorforEachdependenciesflatMapflagsfindupparentcensorbusycachemonorepoexit-codetoobjectecmascriptserializeTypeBoxcommand-lineeveryslotencryptionglacieropenperformancetyped arraycallwalkconsoleInt16Arraywordbreakawesomesauce__proto__operating-systemawscirculartddES2020rm -rftrimRightescapetrimStartenderemojilistenersdomefficientStyleSheetarraybufferenvtypeerrorfindLastMappatchmochautilitygroupBycoerciblecall-bindECMAScript 2018avaestreeextensionkeyclonevalidationpopmotionregexpWebSocketcloudwatches7queryURLprunehigher-ordertoolsURLSearchParamsInt32ArrayprocessfluxvalidstarterqswritablefolderasyncschemeinvariantgdprbrowserdatastructurebeanstalkpropObjectcloudfrontArrayBuffer#slicespringi18njavascriptES2021getPrototypeOfcommandfind-upStreamspackagesunicodees2015rm -frrmmapYAMLjsdiffloadingtscompareArray.prototype.flatsignalswaitclientvaluesamazonhardlinksAsyncIteratorReactiveXcall-boundsearchrequiredropparsingisConcatSpreadablecallboundcoloures-shim APIauthcurlrandomgetters3guidfast-deep-cloneauthenticationendpointtaploggermergeentriespositiveString.prototype.trimES2019ArrayBuffercharactermkdirchaipostcss-pluginframeworkWeakSetlinuxlinkfseventsagentobjes2018findLastIndexshrinkwrapmiddlewarehas-owndebuggerpromisesfunctionparentssharedarraybufferreduxfunctionalmovemakeinstallerless cssutil.inspectthreeenvironmentbootstrap lesstypanionprotocol-buffersstoragegatewayfilterlesscssTypeScriptimport@@toStringTagcolorsymbolsstdlibcallbindObject.getPrototypeOfCSSStyleDeclarationmatcheslintplugindirsortsliceelasticachechinesesigintbindanimationec2Array.prototype.includesCSShasOwnPropertyweaksetparseArray.prototype.findLastIndexwindowsargumenthookformpolyfillspinnersetPrototypeOfsharedratepushregexcompile lessECMAScript 2015fastlanguagefswarningreact posewaapifast-deep-copyconfigurableBigInt64ArrayObject.isES7formtelephonereusefpsarktypetypescripturlcloudformationdatafromutilcssminimalObject.entriesrmdircss nestingwrapsimpledbECMAScript 6ESnextprotobufECMAScript 2023keyscontainsdirectoryrecursiveES8RegExp#flagshandlersworkernested cssrgbRFC-6455functionsObject.definePropertypostcssnamesstablequeueMicrotaskRxSetstyleserializationdataviewsuperstructincludesstyleguidecommander$.extendequalityform-validationserializerwebmulti-packageregular expressionartwatchinginputgradients cssstyleseslintprogresstapetslibxtermarrayredactspeedfull-widthbufferwafsuperagentes2016jasminemacostesterframereventDispatcherflagsignalpreprocessorstateless_.extendECMAScript 2021writepackage managerdescriptionfilemetadatabatchStreamECMAScript 3jestprivate datauninstalljsansiinternal slotprettyemrkoreansigtermdeletegradients css3MicrosoftES2018sesdependency managerlockfilelimitedArray.prototype.findLastajaxreadaccessorxhrless.jsreplaytimevalueprotoomitmixinsfast-clonecomputed-typescore-jshaspropertiesnativedeepclonenodeworkflowstylesheetesnegative zeroObservableslinewrapes-abstractwatchFileinferenceinternaldynamodbweakmaphttpsjsdomJSONcolorsttystatusglobsetImmediatecryptjQuerygetOwnPropertyDescriptorclassesajvlogisreactdataViewchromiumcjkmake dironcewatchererrornamezodequaltaskbytereducedefineaccessibilitygetoptFunction.prototype.nametestingbrowserslisttostringtagsyntaxsymboltypeofassignstylingprivatepicomatchArrayarraysECMAScript 7emitpathwalkingformatiameast-asian-widthlook-upES5asciisetterbundlerconfigapollopredictableupnopethroatECMAScript 2020package.jsonviewwhichstringspinnersl10nreducerboundmobilebreakwidthnumbercloudsearchfast-copyclassnameutilitiestoStringTagUint32ArrayelbString.prototype.matchAllArray.prototype.flatMapdeep-copyoffsetduplexPromisegetintrinsicerror-handlingInt8ArraysortedrapidlaststructuredClonehottrimscheme-validationchromepreserve-symlinksES2016matchesargsObject.assignlogging[[Prototype]]dragformattingArray.prototype.containsargparse3dautoprefixereventEmittervariables in cssuuides5sqslruless compilersidecollectionroute53stringifyes8touchimmutableUnderscorechannelsymlinkphoneTypedArrayReflect.getPrototypeOfmodulessetvariablesSymbolbootstrap cssfastcloneeslint-pluginrequesttype256dom-testing-libraryfindjsxcopyindicatorebscss variablepluginES2023mapreduceshelltrimEndgesturesratelimitprefixtypedarraysgenericsstreams2mkdirsdeterministiceslintconfigiepersistentES3graphqlinoutputnpmbyteLengthclass-validatorconcurrencyfastifyloadbalancingkarmajapaneseES2017dotenvnegativetestposeWebSocketsiteratetypesUint8ClampedArrayshebangbufferslessdescriptorses2017flatreact animationbrowserlistapisameValueZerofullwidthmrumime-dbpnpm9assertoptimistassertsArray.prototype.filterSymbol.toStringTagintrinsicFloat64Arraymkdirpio-tszeroenumerableES6formsArrayBuffer.prototype.slicewordwraphelperspiperegularflattenexitpyyamlobjectreact-testing-libraryworkspace:*extendObservablefixed-widthObject.fromEntriesstyled-componentsquerystringrfc4122a11ykinesisconnectfetchliveassertiontc39readableinstalljsoncss lessparsertoSortedbcryptvpcRxJSbannercolumnsreact-hooksregular expressionscallback-0extrapasswordthrottlecharacterselmsafeargvidleswfIteratorimmerinterruptsconcatMapyupdescriptordatelintdiffdeepcopypackagequotedayjsschemalengthArray.prototype.flattenECMAScript 2019react-hook-formbddhashgetrds.envECMAScript 2022iteratorprototypecloudtraildefinePropertyhooksmomenttextRegExp.prototype.flags
1.0.0

1 year ago