1.0.0 • Published 1 year ago

@saoviettest/in-corporis-natus-distinctio v1.0.0

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

String.prototype.trim Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

An ES5 spec-compliant String.prototype.trim shim. Invoke its "shim" method to shim String.prototype.trim if it is unavailable.

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

Most common usage:

var assert = require('assert');
var trim = require('@saoviettest/in-corporis-natus-distinctio');

assert(trim(' \t\na \t\n') === 'a');

trim.shim(); // will be a no-op if not needed

assert(trim(' \t\na \t\n') === ' \t\na \t\n'.trim());

Engine Bugs

Some implementations of String#trim incorrectly trim zero-width spaces. This shim detects and corrects this behavior.

Tests

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

persistentaccessorthroattextCSSStyleDeclarationwhichwordwraphelperselbdynamodbtypeofHyBigetPrototypeOfstyled-componentsindicatorstyleextradiffUint8Arraygraphqltermquoteenderautoprefixercode pointsArray.prototype.findLastIndex__proto__descriptorsArrayBuffer0metadataString.prototype.matchAllsuperagentreducermrurm -frfilterproxylruansiform-validationsafesymbolsnested csstoSortedgroupBypruneimmutablebrowserslistencryptiontesterhotcirculardataViewinternalshamdescriptorcorsprefixdayjsschemareducedebugPromisedefinePropertyzeropropertiescheckeast-asian-widthES2023shim_.extendownbeanstalkescapeObject.entriescryptoprettyisReactiveExtensionsArrayfast-deep-copydomserializationstdlibprototypees8stylesheetES3callbackregexasciiObject.getPrototypeOfloggerArrayBuffer#slicediri18nlessserializetraversejsonpathflattenargumentconsumeduplexmimetypesconcatprivatees7dependenciesa11ychaistylesglacierhardlinksargsscheme-validationtrimpreserve-symlinksfastclonesymlinksconfigamazonbcryptarraybuffermkdirpObservableUint8ClampedArrayassertskeyobjectlocationrapidfluxclass-validatorspinnersyntaxObject.fromEntriesrangeerrorapiconcatMapECMAScript 2022environmentbyteLengthpnpm9file systemInt32Arraypiperouterandomtyped arrayeslintredux-toolkitnamepropertywebmovemiddlewarees2015gdprremoveshrinkwrapObject.isglobforEachfunctionsrdsSymbollintequalkarmaeventDispatcher$.extendcryptgetintrinsiciteratorunicodecreatekinesisbundlertakesortassertfromBigInt64ArrayrmSymbol.toStringTageslintconfigES2019lastespreeinstallerroutingArray.prototype.flatautoscalingsestoStringTagparents[[Prototype]]l10nasyncresolveauthkoreanvariablespackage.jsoncollectionerrorsqsuninstallES2015genericssettingsReflect.getPrototypeOffindLastIndexcommandtypeerrortestwaitstreamsstylingRegExp.prototype.flagsworkflowhashschemeawsworkspace:*bundlingsharedarraybuffersetterlibphonenumberarrayTypeBoxutil.inspectsearchfindLastfind-upextensiongetopttddcomputed-typesemojijestESnextUnderscorefetchTypeScriptprototypedarray.envhooksfullvalidateefficientzodchinesedebuggerwordbreakbuffersponyfilltypejsxpackagebluebirdjapanesestarterECMAScript 2018workertrimEndiamiterateless csscontainses-shimsawaitmimepropprotocol-buffersoffsetinvariantmkdircolorquerydatebannerhigher-orderES2018Array.prototype.flattenconsolewritableviewfast-deep-cloneecmascriptspecES8iterationwalkingjsdomgetdirectorydeepcloneWeakSetmake dirisConcatSpreadabletoolssetImmediatetrimRighteventEmitterweaksetArray.prototype.filterECMAScript 3mergewhatwg-0extendmulti-packagekeyscss lessredirectpromisesnopeastawesomesaucelimitedqueuecloudtrailboundtimeapollonodepredictabletapstringifierhookformtestingstreams2groupurlSetgetOwnPropertyDescriptorObservablessymbolshareddatastructuredeletehasOwnPropertyfixed-widthfastspinnersFloat64ArrayhasObject.assignflagsWebSocketlivecolumncloudsearchprivate dataregexpperformantpasswordparsees2016queueMicrotasknumbertaskindotenvReactiveXnodejses-shim APIclassessetoptionformPushpackagesArrayBuffer.prototype.slicecliexpresscjkwriteairbnbmochaes5tostringtagcachespeedECMAScript 2015snsstructuredClonefunctionutilcloudwatchxtermURLhasOwnFloat32Arrayjavascriptless compilerartwafvalidestreeentriesWebSocketsStreamparentfindupaccessibilityfast-clonetypestoolkites2018regularweakmapjscallenumerablevpccollection.es6react-hook-formcolumnsdataviewECMAScript 5promiserequestes-abstractes6bddcssfilechromiumargvendpointless.jsassignconcurrencyObject.definePropertyRxJShttpsdeep-copyformattingObjectObject.valuesloadbalancingpushcloudformationdeterministicregular expressionsconfigurableroute53colourec2validationcommandernpmECMAScript 2020frameworkargparsewatcherstreamuuidthrottlemixinsvariables in cssInt16ArraylesscssoutputclassnamesnativepostcssutilityslicebytejwtlinewraptoobjectwgetincludesECMAScript 2016idleUint16ArrayURLSearchParamsWeakMapformatRegExp#flagsidxhrInt8Arrayrgbexpressionmatchcall-boundfunctionaldefinebatchupBigUint64ArrayebsauthenticationopenreactStyleSheetsequencebootstrap lesspluginmodulesJSONcore-jsfast-copymkdirsfigletpostcss-pluginphoneArray.prototype.findLastbreakminimalpolyfillflatdeeptypedfullwidthRFC-6455connectemrreact-testing-libraryswfArray.prototype.containsslotsimpledbdeep-cloneUint32ArraylengthlimittsES7storagegatewaycurlreduxRxstabletypescriptrecursiveflagsuperstructmakecodesstringifyenvfastcopyhttptc39Function.prototype.nameobjoptimistinferencehas-ownsomebindAsyncIteratortrimLeftimportexportrm -rfeslintpluginIteratordom-testing-libraryECMAScript 2019sortedcoerciblerfc4122terminalcloneCSSparsingStreamsjsdiffECMAScript 7Array.prototype.includesclassnamemonorepoMapdescriptionECMAScript 2017ES2022statelessquerystringprotobufreuselistenersarraysbyteOffsetexecES6jasminecomparegradients cssesfastifycensorfsshebangoptimizertapecompilerECMAScript 2023busypathfull-widthsameValueZerotrimStartinternal slotchannelstyleguideObject.keysrequiretypesaferuntimeqsyupYAML256valuesio-tsratelimitless mixinsfseventscss nestingwatchingprogressfolderimportredactwatchESbrowserintrinsicECMAScript 2021bootstrap cssJSON-Schemalinkmoduleajvchromereal-timewarningwalkcall-bindjQuerytsliblanguageES2017compile lessbrowserlisttoArraypackage managerlook-upflatMapmapreduceECMAScript 6lazydataloadingutilitieswatchFile@@toStringTageslint-pluginemitfindinspectttyparsereventscopyelasticachematchesshellloggingtouchguidomit
1.0.0

1 year ago