2.4.17 • Published 2 years ago

@taktikorg/labore-fugiat-neque v2.4.17

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

CircleCI codecov downloads npm snyk

@taktikorg/labore-fugiat-neque

@taktikorg/labore-fugiat-neque is a library for validating and manipulating IPv4 and IPv6 addresses in JavaScript.

Migrating from 6.x to 7.x

@taktikorg/labore-fugiat-neque was rewritten in TypeScript for version 7. If you were using version 6 you'll need to make these changes to upgrade:

  • Instead of checking isValid(), which has been removed, you'll need to use a try/catch if you're accepting unknown input. This made the TypeScript types substantially easier as well as allowed the use of an AddressError class which will contain a parseMessage if an error occurred in the parsing step.
  • Instead of using the error, parseError, and valid attributes you'll need to use the message and parseMessage of the thrown AddressError.

Documentation

Documentation is available at @taktikorg/labore-fugiat-neque.js.org.

Examples

var Address6 = require('@taktikorg/labore-fugiat-neque').Address6;

var address = new Address6('2001:0:ce49:7601:e866:efff:62c3:fffe');

var teredo = address.inspectTeredo();

teredo.client4;    // '157.60.0.1'

Features

  • Usable via CommonJS or ESM
  • Parsing of all IPv6 notations
  • Parsing of IPv6 addresses and ports from URLs with Address6.fromURL(url)
  • Validity checking
  • Decoding of the Teredo information in an address
  • Whether one address is a valid subnet of another
  • What special properties a given address has (multicast prefix, unique local address prefix, etc.)
  • Number of subnets of a certain size in a given address
  • Display methods
    • Hex, binary, and decimal
    • Canonical form
    • Correct form
    • IPv4-compatible (i.e. ::ffff:192.168.0.1)
  • Works in node and the browser (with browserify)
  • ~1,600 test cases

Used by

es2018hasparsedirectoryvpclruguidsimpledbenvbinl10ntostringtagterminalprivate dataBigUint64ArrayyamlpropertyjapanesevaluesmkdirObject.valuesString.prototype.matchAllstylesArrayBuffer.prototype.sliceajaxawsutilsec2fromdotenvcharacterECMAScripttoArraybeanstalkES2017timenodeforkFloat32ArrayInt16ArrayargumentmoduleseventstoReversedCSSliveObject.definePropertyspringowntypeofreact-hook-formkeysbindstructuredCloneprototypeesslotpromiseformsvarscallbindscheme-validationReflect.getPrototypeOfprunechromiumfpenvironmentTypedArraymapreducefunctionbrowserslistsignedArray.prototype.containsclonespeedtypesafeopensslmakeUint8Arrayconsumees2016protoexit-codeponyfillqueueWebSocketflatMapestreeshebangtestingObject.assignformatflagsdatabyteLengthcensorreact-hookshandlerstraverseES2021react animationsequenceimmernpmRFC-6455has-ownxhrreact posewgetcolumnsInt8Arraytypediees5equalcomparejshintasynces-shimsbrowserlistless compilergetOwnPropertyDescriptormatchAllworkspace:*RxJSgetterES7metadata0assertioncodessharednodejssetPrototypeOfspinnerfastpushtakeeslintconfiginvariantpluginlasttyped arraycolorCSSStyleDeclarationobjectInt32Arraydeep-copyinspectdescriptorfetchintrinsicES2016callboundutilframerObject.getPrototypeOfboundsignalsa11ySymbolgradients css3variables in cssspecbufferelasticacheformlesszerounicodesafejson-schema-validationredux-toolkitregular expressionutilitydatesidefixed-widthairbnbnested cssECMAScript 2018gesturesfullwidthinferencefnmatchcurlfastcopyconfigES2020file systemdefinePropertyrfc9562optimizerES8getES6rulesfull-widthhttpsmatchbusyansipreprocessorjsxtoStringTagiterateObject.isjsdomregexp256commandshimbabel-corevisualfantasy-landassertslibphonenumberJSONsuperstructReactiveXchaibannermapeast-asian-widthiamauthenticationmoveUint16ArrayStreamsgraphqlcommanderefficientexecfilecheckphonesigtermhasOwnPropertycss variablefunctionaltelephoneautoprefixerfunction.lengthtypeconstreversedfast-copyregular-expressionECMAScript 2020containsWeakMaplinkwaitschemeUnderscoresetterjavascriptjQueryeslintvalueextrafindenderclientclassnameseffect-tscss nestingSystem.globaltouchoperating-systemTypeScriptimportcollectionless cssnamesencryptionbdd[[Prototype]]WeakSetes6deep-cloneFunction.prototype.namegradients csscopytoSortedHyBipostcsslesscssstylingperformancematches-0BigInt64ArrayECMAScript 2019@@toStringTagbyteastajvremoveselferror-handlingartendpointwindowshookformbabeltesterpipestoragegatewayes2017regularECMAScript 5symlinksgitignorereverseanimationprotobufdomglobalsdependency managerpositivereadableAsyncIteratorhotArrayBuffer#sliceimportexportArray.prototype.findLastECMAScript 3proxysymbolsshrinkwrapless.jscryptogroupByreplaycall-boundES2018widthsortgdprfastifymkdirsURLSearchParamsrangeerrorJSON-SchemaECMAScript 6shamlocal__proto__createserializationfast-deep-copyobjpatchES2023symbolstringifiereslintpluginwhichjwturlbundlerglobalThis6to5json-schema-validatorReactiveExtensionsapiArrayBufferdeletecloudtrailfigletpropertiesquerykeyreactoptimisttacites-shim APIstatus.gitignoretrimsignalRegExp#flagsparsercomputed-typeslengthcloudwatchio-tstc39tssigintmixinsjsdiffchildlockfilelogs3settoolsuser-streamsaccessoreventEmittersesyupemrhasOwnramdainstallerloadbalancingpolyfilltranspilerminimalString.prototype.trimtslibsqsidlenamefsjswritextermclassnamesuperagentES2015compile lesswalkrequestassertargvpropinternal slotnumberemitcryptreducecss-in-jswarningStyleSheetlistenersinstallsettingsgetoptcss lessutilitiesspinnerslinuxvalidationhardlinksESsliceless mixinsparsingtrimEndes8Object.fromEntriesconfigurableObject.entriesthreeglacierzxArray.prototype.findLastIndexfindLastdeepclonetddwaapiform-validationjsonschemabinaryreduxdeepregexinternalsomedeterministicObject.keysbrowsercjkloadingrfc4122Setwritableidentifiersglobal this valueprotocol-buffersrandomes7apollostableroutingi18nreducercolorscoretypesiteratordatastructureincludesisConcatSpreadabledataViewbootstrap lessURLarrays$.extendpreserve-symlinksposeignoreinterruptssymlinkprivateresolveweaksettypedarrayspostcss-pluginhttpSymbol.toStringTagclitranspilemanagerWebSocketsviewqueueMicrotaskerrordircallbackebscommand-lineutil.inspectvalidserializeqsstylesheetargsES5prefixfpsarraybufferchineseswfschemacachesharedarraybufferharmonyelmglobpyyamlcloudformationchannelbcryptwhatwgarktypeRegExp.prototype.flagsmulti-packagenegative zeroconcatMapincall-bindreuseinputes-abstractjestECMAScript 2022sameValueZerostarteres2015persistentcertificatescloudsearchUint32Arraydescriptionglobal objecteventDispatcheramazonmodulerapidflattenstreamECMAScript 2017typedarrayecmascriptFloat64Arrayloggersubprocesskoreanmkdirpquotepurecollection.es6fluxauthjsonglobalUint8ClampedArraymomentpackagesprogressgetintrinsicjson-schemakinesisrecursiveletvalidateObservableroutenativeexecECMAScript 2023real-timemacospnpm9stringRxttyawesomesaucefilterdefinestatelessarraygetPrototypeOfautoscalingelbpathtrimRightnpmignorelanguageconcatenumerabledescriptorsstreamstrimStartpackage.jsonruntimespawnworkflowvarextendObservablesmrueverypackage managerwafoptionnopegroupuninstallArray.prototype.filter3droute53validatorArray.prototype.flatMapweakmapclassesStreamstyled-componentsPushentriesrdsECMAScript 2021statecompilermake dirsorteddom-testing-librarypasswordreadwindowIteratorhookstextcolourArray.prototype.flattenequalityomitloggingtypescriptoncepinofullvestArrayuuidfast-deep-clonegenericsshellirqprettylazybuffersESnextfastclonecurriedtestiterationmergequerystringisexecuteelectronPromisehashfindLastIndexmonorepojoidraghigher-ordermobileES3syntaxprocessredactformattingbinarieseslint-plugintypeerrorMapArray.prototype.includestrimLeftchrometypanionexitasterisksrgbperformantflatcircularsetImmediatefileenvironmentsdataviewdynamodbclass-validatortransportassignreadablestreamECMAScript 2016indicator.envsnsdayjsArray.prototype.flatpicomatchoutputzoddependenciesserializertoobjectflagbyteOffsetdiffcloudfrontcssstringifyvariablespredictabledeepcopyasciilintconsoleoffsetagentES2022escapereact-componentcoerciblepoint-freerobustfast-cloneacorn
5.5.85

2 years ago

5.5.84

2 years ago

5.5.83

2 years ago

5.5.82

2 years ago

5.5.81

2 years ago

5.5.80

2 years ago

5.5.79

2 years ago

5.5.78

2 years ago

5.5.77

2 years ago

5.5.76

2 years ago

5.5.75

2 years ago

5.5.74

2 years ago

5.5.73

2 years ago

5.5.72

2 years ago

5.5.71

2 years ago

5.5.70

2 years ago

5.5.69

2 years ago

5.5.68

2 years ago

5.5.67

2 years ago

5.5.66

2 years ago

4.5.66

2 years ago

4.5.65

2 years ago

4.5.64

2 years ago

4.5.63

2 years ago

4.5.62

2 years ago

4.5.61

2 years ago

4.5.60

2 years ago

4.5.59

2 years ago

4.5.58

2 years ago

4.5.57

2 years ago

4.5.56

2 years ago

4.5.55

2 years ago

4.5.54

2 years ago

4.5.53

2 years ago

4.5.52

2 years ago

4.5.51

2 years ago

4.5.50

2 years ago

4.5.49

2 years ago

4.5.48

2 years ago

4.5.47

2 years ago

4.5.46

2 years ago

4.5.45

2 years ago

4.5.44

2 years ago

4.5.43

2 years ago

4.5.42

2 years ago

4.5.41

2 years ago

4.5.40

2 years ago

4.5.39

2 years ago

4.5.38

2 years ago

4.5.37

2 years ago

4.5.36

2 years ago

4.5.35

2 years ago

4.5.34

2 years ago

4.5.33

2 years ago

3.5.33

2 years ago

3.5.32

2 years ago

3.5.31

2 years ago

3.5.30

2 years ago

3.5.29

2 years ago

3.5.28

2 years ago

3.5.27

2 years ago

2.5.27

2 years ago

2.5.26

2 years ago

2.4.26

2 years ago

2.4.25

2 years ago

2.4.24

2 years ago

2.4.23

2 years ago

2.4.22

2 years ago

2.4.21

2 years ago

2.4.20

2 years ago

2.4.19

2 years ago

2.4.18

2 years ago

2.4.17

2 years ago

2.4.16

2 years ago

2.3.16

2 years ago

2.2.16

2 years ago

2.2.15

2 years ago

2.2.14

2 years ago

2.2.13

2 years ago

2.2.12

2 years ago

2.1.12

2 years ago

2.1.11

2 years ago

1.1.11

2 years ago

1.1.10

2 years ago

1.1.9

2 years ago

1.1.8

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago