1.1.15 • Published 1 year ago

@dramaorg/nobis-fugit v1.1.15

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

@dramaorg/nobis-fugit Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

An ES5 mostly-spec-compliant Object.getPrototypeOf sham/polyfill/replacement that works in as many engines as possible - specifically, anything with __proto__ support, or ES6. Built-in types will also work correctly in older engines.

This package implements the es-shim API interface. It works in an ES3-supported environment and complies with the spec.

Example

var getPrototypeOf = require('@dramaorg/nobis-fugit');
var assert = require('assert');

assert.equal(getPrototypeOf(true), Boolean.prototype);
assert.equal(getPrototypeOf(42), Number.prototype);
assert.equal(getPrototypeOf(''), String.prototype);
assert.equal(getPrototypeOf(/a/g), RegExp.prototype);
assert.equal(getPrototypeOf(new Date()), Date.prototype);
assert.equal(getPrototypeOf(function () {}), Function.prototype);
assert.equal(getPrototypeOf([]), Array.prototype);
assert.equal(getPrototypeOf({}), Object.prototype);
var getPrototypeOf = require('@dramaorg/nobis-fugit');
var assert = require('assert');
/* when Object.getPrototypeOf is not present */
delete Object.getPrototypeOf;
var shimmed = getPrototypeOf.shim();
assert.equal(shimmed, getPrototypeOf.getPolyfill());

assert.equal(Object.getPrototypeOf(true), Boolean.prototype);
assert.equal(Object.getPrototypeOf(42), Number.prototype);
assert.equal(Object.getPrototypeOf(''), String.prototype);
assert.equal(Object.getPrototypeOf(/a/g), RegExp.prototype);
assert.equal(Object.getPrototypeOf(new Date()), Date.prototype);
assert.equal(Object.getPrototypeOf(function () {}), Function.prototype);
assert.equal(Object.getPrototypeOf([]), Array.prototype);
assert.equal(Object.getPrototypeOf({}), Object.prototype);
var getPrototypeOf = require('@dramaorg/nobis-fugit');
var assert = require('assert');
/* when Object.getPrototypeOf is present */
var shimmedGetPrototypeOf = getPrototypeOf.shim();
assert.equal(shimmedGetPrototypeOf, Object.getPrototypeOf);
assert.equal(Object.getPrototypeOf([]), Array.prototype);

Tests

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

chaipolyfillstablecode pointsloggingpropertyjoicolumndropcensors3shrinkwrapwaapipyyamlMicrosofttouchexecsqslogqsbyteLengthflatsharedloadbalancinggetOwnPropertyDescriptortypeerrorexpressionbddfull-widthiteratortacitshimformatregular expressionworkflowzxequalityECMAScript 2019vpcfastclonenodejsshellroutingoffsettslibString.prototype.trimroute53function.lengthgitignoreglobal this valuevalidatoriteratecommand-linechannelpreprocessorES2016validatesinatradeterministicregexpString.prototype.matchAllmapreducearraysajaxstyled-componentsSymbol.toStringTagjsdomwaitnegativees-shim APIURLSearchParamsObservablesansihashcompilercharacterstypescriptoptionrapidcore-jsinpatchflattenajvObject.entriestimeairbnbhas-ownRxsuperagentdeepArray.prototype.containsdeepcopyinvariantreadenderonceJSON-SchemalinkvariablesebssetPrototypeOffnmatchimmerestreeMapBigUint64Arraydefinecolorses7schemavisualviewdescriptorwebproxytaptoobjectwritestringgenericsslotcolorjson-schema-validationES5avapushsymbolswhichchromecall-boundelbunicodeargsttyconsoletypedarraysdataeslintconfigtestertsreducemkdirphardlinkssettingsdomobjfeedswfvaluestylesarraybufferweaksetmanagerfile systemsafeformattingenvironmentjshintfetchdotenvcreatecoreECMAScript 3parsebundlertrim3dECMAScript 2015intrinsicjavascriptmetadatakoreanmonorepofastInt16ArrayextratrimEndlocalinstallerwgettoSortedes2015io-tsfigletmergetestjsonutilhasOwnPropertybabelReflect.getPrototypeOfflagrecursivedeletetoolkitbuffersutil.inspectemiteverytransformcodesutilitiesanimationslicePushBigInt64ArrayphonecollectionArray.prototype.findLastIndexfolderObject.getPrototypeOfECMAScript 2021reversemrubinaryownregular-expressiongroupfilterfilenopeinspectfixed-widthnamesbrowserslistquerydayjsdataViewqueueasyncstarterFloat64Arraynativeglobal objectpure-0formECMAScript 6syntaxerrorisConcatSpreadableimmutablemkdirsdependenciespathcloneforkECMAScript 2017ES6cachebrowserpluginES2020$.extendidlelook-upiamec2xhrselfstreamsESnextcommandfast-deep-cloneutilsassignhookformregular expressionsfastcopyminimalprototypeclivarreact-hookstypesafeparentstapereal-timereact posetc39parserObject.fromEntriestrimStartconfigperformantlanguagejasmineexecfilecoercibleespreemake direffect-tssnsUint32ArraystylecheckWebSocketsextendcryptodescriptorssameValueZerotraverseemojiECMAScript 7artacornforEachES2019shamspinnerwafrouterapolloes2018TypeBoxRFC-6455popmotiontrimLeftobjectrandomgetterentriesponyfillstreamURLdatejestutilitywalkingflagsframerrangeerrorUint8ClampedArraycloudwatchmochaautoprefixergetintrinsicmanipulationimportfunctionES2015fpsdynamodbrmurlredirectinternaltyped arrayES2022postcss-pluginclassnameerrorreversedspecFloat32Arrayfind-upposebyteweakmapes2017telephoneArray.prototype.flatreadablestreambinariesObject.definePropertyinternal slotjQuerysortedes2016modulemakehasOwncallbackamazonrobustidperformanceuninstallhtmlReactiveXnpmlibphonenumberES7guidprotocol-buffersfrompromisefsefficientstylinghascurriedfastifyjson-schemareuselrutypeelasticachedragrgbStreamstypanionreduxcsswidthmkdirpoint-freechineseUint8Arraycollection.es6ObjectuphttpsArrayBufferhigher-orderzodrfc4122serializerpnpm9formstestingruntimeeventDispatcherES2021parentcomputed-typesgraphqlArray.prototype.flatMaprmdirstringify6to5esfindupECMAScript 2022rssargvfast-copyexecutePromiseObject.istoolsWeakSetmobilecharacterbundlingsymbolistanbulendpointtypeoffunctionses-abstractwhatwgcallboundFunction.prototype.namedataviewtostringtagfindLastfullwidthdebuggerpropertiesbannerterminalignoreObject.keysObservablejapaneseagentserializationES2018geteslintplugin__proto__colourhelpersearchwindowremoveimportexportflatMapglobalThiskarmaidentifierses8gestureslengthjson-schema-validatordependency managerfpmoveeslint-plugincompareCSSStyleDeclarationvalidationequallintbeanstalkawesomesauceautoscalingoutputzeropostcssTypedArrayfunctionalRxJScloudtrailhelperscolumnsscheme-validationemrquerystringiscloudsearchnodematchAllsideconsumegetPrototypeOfReactiveExtensionswarningyupECMAScript 2020negative zeroelectronnumberhttpfast-deep-copyInt8ArraycloudfrontvestecmascripttextUint16Arraysettermatchesjsonschemakeyasterisksxtermpositivemap.gitignorebrowserlistcommandervarshooksECMAScript 5Array.prototype.includesquotesesprivate dataclasseskeysfindawscjklistenersrouteyamlfast-cloneprotoastharmonypruneInt32ArrayIteratorJSONtranspilerpackagearrayregularTypeScriptspinnerses5bindYAMLsuperstructglobalpackagesrequireSetdeep-copytoArrayvalidnamepinoprotobufarktypeStyleSheetclassnamesreact-testing-librarytoReversedspawndirectorysharedarraybuffer.envUnderscoreEScirculardebugcoverageincludesloadinglocationArray.prototype.findLastqueueMicrotaskindicatorinstrumentationHyBirestfulWebSocketpackage managerclientdescriptionuuidapijsxeslintshebangES2017installbabel-coresource mapworkercalltransportcurlfindLastIndexcss-in-jssubprocessstoragegateway0picomatchaccessorserializeuser-streamsWeakMapsomenpmignoreasciitermproppackage.jsonprefixECMAScriptexpressworkspace:*lookRegExp.prototype.flagsSystem.globalresolvetakestringifierfullsimpledbrdssymlinksframeworkCSS@@toStringTagconcatMapassertredactprocessinputObject.assignECMAScript 2023pipeprogressconfigurableform-validationArrayenvieSymbolmatchECMAScript 2018copyglaciereast-asian-widthramdatypesassertsenumerable_.extendgdprArray.prototype.flattenwalka11yenvironmentslastloggerES2023react-hook-forml10nconcatmulti-packageObject.valuesreactprettyinferenceECMAScript 2016readableappsortspeedescapexmles-shimsargumenttranspilejsdiffStreamrm -fri18nES3structuredCloneArrayBuffer#slicereworkgroupByjscloudformationboundbinconsteventsbusyreducertypedtrimRighttypedarraydom-testing-libraryoptimizerseteventEmitterES8globalswritablekinesisgetoptreact animationArray.prototype.filterAsyncIteratorrules256globrm -rfsyntaxletstyleguidechilddeepclonees6optimistbufferbyteOffsetdirlockfileprivatemomentcallbinddefineProperty
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