npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@taktikorg/iste-eveniet

v3.4.90

Published

@taktikorg/iste-eveniet<br> [![NPM Version](https://img.shields.io/npm/v/@taktikorg/iste-eveniet.svg?branch=main)](https://www.npmjs.com/package/@taktikorg/iste-eveniet) [![Downloads Per Week](https://img.shields.io/npm/dw/@taktikorg/iste-eveniet.svg?colo

Downloads

2,005

Maintainers

lechuongb878lechuongb878

Keywords

clideepcheckoptimistwindowsInt16Arrayxtermthreerequireformattingreusefromreadablestreamcomparestyled-componentsmockingmodulesecmascripttddnodekeyes2016preprocessormruec2settermatchAllschemeArray.prototype.flatMapramda256unicodearraybufferECMAScript 3collectionsnscompilerttyerror-handlingdefinePropertyxhrquotepersistentuninstallsortedinstallerbootstrap cssFunction.prototype.namebyteLengthcachespeedincludesjshintschemacodesstyleECMAScript 5mapartutilsRxcurlInt8Arraypatchglobal this valuetrimregular expressionbinArray.prototype.containsArrayBuffer.prototype.slicesubprocessinvariantarrayBigInt64ArrayfunctionsfastcopyremoveexpressionES2019helpertypesafeObject.assignES2017io-tsECMAScript 2018ajaxlintvaluesdataviewconfigurableescapetoobjectES5argvObject.ishandlersECMAScript 2020enumerablefixed-widthredactfunctionals3groupByconstflatelectroncertificatescallbackES6internaltypedarraysisConcatSpreadablecommanderutil.inspectsliceliveperformancecjkmatchesconfigtoStringTagSymbol.toStringTagfast-deep-clonetostringtaggetnamesworkflowawsarrayscalljson-schemanodejsanimationregexsignalgradients css3fastclonejoisomeautoscalingdataViewcoreasterisksfilterfast-clonewritablefastrecursivemanager__proto__dataArray.prototype.findLastless compilermobilehas-ownnumberimportexportbrowserslistconcatObservablesstringifyansiencryptionnegativefront-endpipevalidateesclone[[Prototype]]lessYAMLspawnFloat32Arrayloggertestautoprefixerfast-copyjsdompostcssfullwidthjapaneseArrayBuffer#sliceserializerfpstransportsameValueZerodescriptorMapstringifiershellelasticacheTypeScriptworkspace:*ES2018prefixeffect-tsinternal slotstreamsexpresslinux$.extend@@toStringTagzodacorndynamodbCSSbyteOffsettakeroute53ECMAScript 2022equalestreeaccessoreventsPromisejsdiffoptimizerdirectorytrimRightselffsgitignoreroutingtoArraylockfileparseECMAScript 6endpointreadableloadbalancinglesscssES8proxyObject.entrieses-shim APIhelpersgetoptpinocrypttyped arrayvariables in cssES2023windowdeepclonebddieswfmkdirperformantbundlerJSON-Schemasidefpcreateinspectdom-testing-librarycoercibledependency managertermES7settingsconsumetypedarrayenvironmentscloudtrailaccessibilitygetOwnPropertyDescriptorRegExp.prototype.flagsscheme-validationregular-expressionreduxhandlergetintrinsickeysWeakMaptimeMicrosofteslintconfiguser-streamstesterspinnersspinnermetadatajsongetPrototypeOfcollection.es6hasOwnPropertyvariablesprogressECMAScriptproptypeofObject.keysamazonhaspyyamltextflagsl10nless csspackage managerexecfilees7AsyncIteratorsqsiamprotocol-bufferscommand-linenameposecss nestingwidthform-validationbuffersdeepcopyreact animationgroupkoreansymlinktypeerrortsObject.fromEntriesauthchromewafUint32Arrayfast-deep-copyefficientdomsignalsshamiteratorstartertouchObservableflattenrouteterminaldropelmmomentformatoperating-systemgraphqlgetteruploadsimpledbtypanionelbES2020ReactiveExtensionsapiequalityexecutesafefunction.lengthredirectUint16ArraydragtoSortedcore-jsprivatereact-testing-libraryassertionletObjectvalidationcss-in-jssyntaxeventEmitterfigletes6protobufObject.valuesfastifysharedarraybuffersetImmediatehigher-orderspecqueueMicrotaskESclassnamescomputed-typesebsoutputbusystate0ignoremergeeslintcall-binddescriptionECMAScript 2021syntaxerrorfetchastECMAScript 2023shareddeterministicgradients cssRFC-64556to5copyfindLastIndex-0shrinkwrapasyncglacierURLSearchParamspopmotionUint8ArrayweaksetworkerlanguageshimECMAScript 2017exit-codeeslintpluginnpmsignedcommanddatastructurevestBigUint64ArraygenericsconsoleESnextinterruptsprivate datagdprreducehardlinkstslibassignslotlrudeleteFloat64Arraystylesheetclass-validatormakemockless.jsjestdefineawesomesaucerobustbinarieswhatwga11yzxpredictableredux-toolkitstringdeep-cloneglobalpromiselibphonenumbernopeforktypeECMAScript 2015call-boundECMAScript 2019offsetwalkSettrimStartminimalshebangdiffinferenceserializedayjsString.prototype.trimspringjson-schema-validationenvironmentidentifiersfantasy-landtoolkitchildjwtES2022clientcolumnspoint-freeservicephonejavascriptreact-componentutilvpcnativechineseSystem.globalinWeakSetagentqspicomatchsetPrototypeOfglobtypedstructuredClonechromiumRegExp#flagsHyBilastassertssymbolruntimecircularprettyquerystringpositivefunctionsymlinksboundstyleguideenvforEachrandomfnmatchstatelesstypesPushexecauthenticationemittc39stylesfindtoolsObject.definePropertyreact-hookslocalUnderscoresiginterrorreact posecurriedchaiStreamsjson-schema-validatoreventDispatcherpurepushmonorepofileloggingchannelimmutableJSONbcryptWebSocketsintrinsici18nlocationidleemrcallboundprocessapollobrowserlistqueueframerdependenciesUint8ClampedArraytacitlengthcloudsearchiterationsetjQueryoptionwriteopensslwaapiomitreact-hook-formstylingObject.getPrototypeOftranspilees2017.envbabel-coreprotoairbnbbindIteratorpostcss-pluginlinkdotenventriesbootstrap less3dcensorbeanstalkrdsweakmapstablebundlingsortpropertiesES2015flatMapArray.prototype.includesreducerbannerquerycss lesseveryvalueponyfillreplayajvinstalljsonschemarulesvalidatores-shimspathlazytrimEndoncecolornested cssbabelCSSStyleDeclarationcolourinputisdateclassestypescripttelephonemapreduce

Readme

@taktikorg/iste-eveniet NPM Version Downloads Per Week License: MIT CI codecov

Universal WHATWG Fetch API for Node, Browsers, Workers and React Native. The scenario that @taktikorg/iste-eveniet really shines is when the same JavaScript codebase needs to run on different platforms.

  • Platform agnostic: browsers, Node or React Native
  • Optional polyfill: it's up to you if something is going to be added to the global object or not
  • Simple interface: no instantiation, no configuration and no extra dependency
  • WHATWG compliant: it works the same way wherever your code runs
  • TypeScript support: better development experience with types.
  • Worker support: works on different types of workers such as Service Workers and CloudFlare Workers

Table of Contents


Install

npm install --save @taktikorg/iste-eveniet

As a ponyfill (imports locally):

// Using ES6 modules with Babel or TypeScript
import fetch from '@taktikorg/iste-eveniet';

// Using CommonJS modules
const fetch = require('@taktikorg/iste-eveniet');

As a polyfill (installs globally):

// Using ES6 modules
import '@taktikorg/iste-eveniet/polyfill';

// Using CommonJS modules
require('@taktikorg/iste-eveniet/polyfill');

The CDN build is also available on unpkg:

<script src="//unpkg.com/@taktikorg/iste-eveniet/dist/@taktikorg/iste-eveniet.js"></script>

This adds the fetch function to the window object. Note that this is not UMD compatible.


Usage

With promises:

import fetch from '@taktikorg/iste-eveniet';
// Or just: import '@taktikorg/iste-eveniet/polyfill';

fetch('//api.github.com/users/lquixada')
  .then(res => {
    if (res.status >= 400) {
      throw new Error("Bad response from server");
    }
    return res.json();
  })
  .then(user => {
    console.log(user);
  })
  .catch(err => {
    console.error(err);
  });

With async/await:

import fetch from '@taktikorg/iste-eveniet';
// Or just: import '@taktikorg/iste-eveniet/polyfill';

(async () => {
  try {
    const res = await fetch('//api.github.com/users/lquixada');
    
    if (res.status >= 400) {
      throw new Error("Bad response from server");
    }
    
    const user = await res.json();
  
    console.log(user);
  } catch (err) {
    console.error(err);
  }
})();

Demo & API

You can find a comprehensive doc at Github's fetch page. If you want to play with @taktikorg/iste-eveniet, check our JSFiddle playground.

Tip: Run the fiddle on various browsers and with different settings (for instance: cross-domain requests, wrong urls or text requests). Don't forget to open the console in the test suite page and play around.

FAQ

Yet another fetch library?

I did a lot of research in order to find a fetch library that could be simple, cross-platform and provide polyfill as an option. There's a plethora of libs out there but none could match those requirements.

Why polyfill might not be a good idea?

In a word? Risk. If the spec changes in the future, it might be problematic to debug. Read more about it on sindresorhus's ponyfill page. It's up to you if you're fine with it or not.

How does @taktikorg/iste-eveniet work?

Just like isomorphic-fetch, it is just a proxy. If you're in node, it delivers you the node-fetch library, if you're in a browser or React Native, it delivers you the github's whatwg-fetch. The same strategy applies whether you're using polyfill or ponyfill.

Who's Using It?

|The New York Times|Apollo GraphQL|Facebook|Swagger|VulcanJS|graphql-request| |:---:|:---:|:---:|:---:|:---:|:---:| |The New York Times|Apollo GraphQL|Facebook|Swagger|VulcanJS|graphql-request|

Thanks

Heavily inspired by the works of matthew-andrews. Kudos to him!

License

@taktikorg/iste-eveniet is licensed under the MIT license © Leonardo Quixadá

Author

|@lquixada| |:---:| |@lquixada|