2.1.9 • Published 5 days ago

@hishprorg/odit-nobis-ipsam v2.1.9

Weekly downloads
-
License
MIT
Repository
github
Last release
5 days ago

@hishprorg/odit-nobis-ipsam Version Badge

github actions coverage License Downloads

npm badge

Array.prototype.concat, but made safe by ignoring Symbol.isConcatSpreadable

Getting started

npm install --save @hishprorg/odit-nobis-ipsam

Usage/Examples

var safeConcat = require('@hishprorg/odit-nobis-ipsam');
var assert = require('assert');

assert.deepEqual([].concat([1, 2], 3, [[4]]), [1, 2, 3, [4]], 'arrays spread as expected with normal concat');
assert.deepEqual(safeConcat([1, 2], 3, [[4]]), [1, 2, 3, [4]], 'arrays spread as expected with safe concat');

String.prototype[Symbol.isConcatSpreadable] = true;
assert.deepEqual([].concat('foo', Object('bar')), ['foo', 'b', 'a', 'r'], 'spreadable String objects are spread with normal concat!!!');
assert.deepEqual(safeConcat('foo', Object('bar')), ['foo', Object('bar')], 'spreadable String objects are not spread with safe concat');

Array.prototype[Symbol.isConcatSpreadable] = false;
assert.deepEqual([].concat([1, 2], 3, [[4]]), [[], [1, 2], 3, [[4]]], 'non-concat-spreadable arrays do not spread with normal concat!!!');
assert.deepEqual(safeConcat([1, 2], 3, [[4]]), [1, 2, 3, [4]], 'non-concat-spreadable arrays still spread with safe concat');

Tests

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

readableObject.valuesoptimizerArrayBufferTypedArraydescriptionelasticacheenderglobaluuidpostcss-pluginargsArray.prototype.flatgroupasterisksPushpnpm9make dirhasOwnPropertyawsReflect.getPrototypeOfansicompilerfastcloneparentszerogetanimationrouteforEachinlanguagedataes6numberastlinewrapiepopmotionhtmlpackagesymlinkmergeECMAScript 2016ES2023parsees7arktypedeepcopynpmignoreassertionindicatorhasartstreams2concatMappostcssmochaspawnextraonceURLdataviewbundlerdomFloat64ArrayESnextreact posetesteratomeverysettingswarningassertsaccessibilitycodeslook-upECMAScript 2018Int8ArrayECMAScript 2020subprocesscode pointsJSONhelperseslintconfigguidECMAScript 2015immermodulesECMAScript 2021walkArray.prototype.findLastIndexinspectbatchchromeio-tsscheme-validationdiffmodulelimitedyuptc39flagsbinarychromiumnopejsonyamlmanipulationlogvestconcatisConcatSpreadableprotobufconfigurablethrottleStreammime-dbESdayjsresolvenpmjestjsoffsettoolscryptodom-testing-libraryObservablestestinggraphql-clientponyfillfromfastbuffersfunctionszxtransformrmregular expressionsjavascripttapehookformcallboundspinnersSymbolES3validperformancestoragegatewayUint8Arrayeast-asian-widthbddjapaneseprunecolourrecursiveterminal256descriptorelbmoveagentelectrondeletestableMicrosoftcopyurlReactiveXnamereduxvarshookscharacterfullairbnbkoreanstyleguidewaapitapcss-in-jses5loggingbluebirdcall-bindmanagerjoitoobjectschemeECMAScript 7readtrim-0StreamscontainswaitchannelhttpsclonetddrmdirloadbalancingwrapjshintECMAScript 5syntaxerrorObject.assignexecuteWebSocketcolumnsvpcpluginapollotouchcommand-linestdlibweaksetjQueryes2015dragpositivedebugwhatwgemitreuseeventsfast-deep-cloneestreeinternalunicodesimpledbbusywordbreakhasOwncommandmatchglaciergitignoreroutingpropprettyflatMapchaigetPrototypeOfES6deepcloneprivateidleenvironmentstraversemapES2018avalazyenumerabletakeES2019__proto__extendstarterbindes2018intrinsicsidereact-hooksCSSStyleDeclarationstylingsomemakefunction.lengthdefinelruduplexrangeerrorincludeseslint-pluginstyled-componentstypebeanstalkbinparsera11ypromisequerygetteridexpresspathES8package managertextpyyamlTypeScriptfullwidthECMAScript 2022trimRightpipecharacterscolumnsetterES2021loggervisualString.prototype.matchAllbundlingfilees2016l10nwordwrapschemaupsliceMapsuperstructiterateArray.prototype.flattenreal-timevariablesObjectfigletdataViewspeedpreserve-symlinkseslintplugintimesyntaxsetPrototypeOfwidth_.extendworkerkeyES5YAML.envignoreawaitredactconcurrencyWeakSetescapedirworkflowshrinkwraprandomlintcreatemkdirsdependency managerkinesisexecfilerulesdatastructurehelperfind-upautoscalingUnderscoretrimEndcloudtraillockfileparentnamesregulares-abstractutil.inspectfindupflagArrayremovegenericscore-jseslintconsoleshebanggetintrinsicRegExp#flagsrm -rfArray.prototype.containstoStringTagsqsnodejssymboldroploadingvalueObject.getPrototypeOfbrowserlistRegExp.prototype.flagsstringownsameValueZerofindLastserializationcolorscircularinternal slotespreefnmatcherrorES2022callbindexectest$.extendlooksymlinksES2015entriesfast-deep-copyfolderequalityjsdomCSScoreregular expressionES2020breakpushstringifiertslibInt16Arrayreducermomentformattingroute53identifiersweakmapspecFloat32Arraycurlsequencees-shimsinputstreamargvlocalfpsinferencees-shim APIlimitfast-clone.gitignoreregexpreact-hook-formgraphqlposevalidateArray.prototype.findLastES2017sharedarraybuffercliruntimesource mapxhrttychineseendpointperformantdeterministicclientquoteframerjsxArray.prototype.includesfile systemtypedarraysES7termconsumeWebSocketsredux-toolkitsortedtypednegative zeroprotocol-bufferseventDispatcherhttpquerystringbufferxmlbrowserslistlengthreadablestreamchildbyteLengthqueueproxyRFC-6455keysajaxtypeofsnscheckparsingObject.entriessetImmediategroupByis0reducetelephoneprocessemrasyncString.prototype.trimtypesafecloudfrontarraysarrayvaluesdeepfindcssthroatserializeshamcompareinvariantbannerdefinePropertycoerciblesetswffastcopymimetypesprogressmatchAlles2017karmabinariesfixed-widthRxJSmulti-packageassertrobustajvform-validationobjequaltypanionstringifyimportfssearchtoSortedbrowserIteratormetadataprefixsharedfeedformathashes8phoneRxcall-boundObject.keyscloudsearchreactglobalspreprocessorpropertiesformstreamsxtermstatelessfull-widthfast-copylocationeszodsesprototypereworkoptiontoArrayshellrdsPromiseenvmimeECMAScript 6package.jsonratelimitdependenciesReactiveExtensionsWeakMap
2.1.9

5 days ago

2.1.6

8 days ago

2.1.5

9 days ago

2.1.8

6 days ago

2.1.7

7 days ago

2.1.4

10 days ago

2.1.3

11 days ago

2.1.2

12 days ago

2.0.2

13 days ago

2.0.1

14 days ago

2.0.0

15 days ago

1.0.0

15 days ago