1.0.0 • Published 15 days ago

@lambrioanpm/maxime-deserunt-porro v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
15 days 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('@lambrioanpm/maxime-deserunt-porro');

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

namesextensionreducerrfc4122colourpostcssprunelazyisConcatSpreadablespectasklockfilefindupisRegExp#flagsWebSocketsmulti-packageflagstypedarrayformdataviewrecursivetouchinternal slotlogfolderlogginghotexpressionRFC-6455classnameObject.entrieslesscssrm -rfebsassertionmoduletypescriptidlegetterchromeajaxdeep-clone-0Array.prototype.findLastIndexparseres2016httpes-shim APIcryptconfigurablechannelobjparsing256deep-copywhatwgES5extrasetdirdirectory$.extendelbsymlinkhardlinksexpressthrottleapollomimetypestoolsUint32ArrayHyBiES2019ecmascriptcomputed-typesfunctionswritablepropstylingpostcss-pluginkeysvisualmapreduce[[Prototype]]speedbusytestermake dirserializemodulesArrayBuffer.prototype.slicevalidationmixinsreact-testing-librarybatchless cssmime-dbconcatpromisetoolkitfindLastIndexES8Float64ArraymergeReactiveXupnested csssuperstructiterationsuperagentestreestreamcalllinewrapcssdescriptorshimlibphonenumberECMAScript 5limitedfastclonetrimStartcollectionObservablesStreamAsyncIteratorstatevalueswidthstyleguidequotecolumnwordwrapRegExp.prototype.flagsstringifierenvauthfilterintrinsicquerycommanddependency managerpackagecryptoiterateconcurrencycolorsES2021Uint16ArraybeanstalkobjectECMAScript 2022bundlergdprwritehashelectronbufferscompilerruntimeeslintconfigeventDispatcheropenimportworkertypesafearktypetyped arraystablesyntaximmutable0l10nArray.prototype.filterwrappromisesdefinePropertynegativenopeprivate datatestdebuggerargslocationcoreBigInt64ArrayES2018immerconnectworkspace:*httpsquerystringsliceYAMLstyled-componentsprogressObject.getPrototypeOfUint8ClampedArraypositivetrimES2023Iteratoronceclass-validatordependenciesmkdirstylestoragegatewayomiteslint-pluginvalidatecloudfrontcall-boundes-abstractroutingRxwalkingtraversefullwidthvpcperformanceemiteverysidebufferrm -frtoArraybcryptSetsimpledbMapargument
1.0.0

15 days ago