8.8.94 • Published 1 year ago

@kollorg/saepe-rem v8.8.94

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

@kollorg/saepe-rem Version Badge

github actions coverage License Downloads

npm badge

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

Getting started

npm install --save @kollorg/saepe-rem

Usage/Examples

var safeConcat = require('@kollorg/saepe-rem');
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

enderbrowserprotobufcallbindECMAScript 7arraylintiedatewebsnseslintconfigbufferrestfulhtmlautoprefixersortspeccolorsmodulesuser-streamsdescriptionwgetArray.prototype.flattenentriesECMAScript 6debuggerAsyncIteratorInt8ArrayformsidesafeECMAScript 5dynamodbdirectorypreprocessorapolloYAMLpipefslruairbnbcopylocaloncerandomshellmake dirprototypecompareregularhttprmdirformattingRxJSoptimistnegative zerotraverseUnderscoreES2019coercibleexecxmluninstallSystem.globalRxworkspace:*callassignmkdiridlekeysfromObject.definePropertyhookssomefunction.lengthschemeframeworkprotocol-buffersutilitypurepropertiesmomentsource mapRFC-6455Uint16Arraysharedarraybuffershebangeast-asian-widthes2017classnamegraphqlrangeerrorloadingesscheme-validationReactiveExtensionsWebSocketsmatchcheckatomworkflowassertshasglaciereslint-plugininferencewindowfast-copyES2020classeselbtransportfull-widthtranspiletypedwaapiECMAScript 2021validationeventsdataViewforEachrdsJSONjavascripttypanionspawnInt16Arrayregular expressionreadablestreamwhatwgfpsperformanceTypeBoxUint32Arraythreenpmreact animationponyfillreadstringifypropertyObject.isjsonschemadefinePropertyimmutablefile systemplugintypetoSortedstructuredCloneECMAScript 2022formatserializesetterjsdompropes5robustglobalstyleArrayglobObject.valuesECMAScript 2017extraaccessibilityECMAScript 2016Object.getPrototypeOfUint8Arrayoutputjsdifftextredux-toolkitES2022$.extendprivate datadeepclonepushtrimStartpositiveObject.assignshammergewaitreact-testing-libraryclonerequestequalitykarmasharedautoscalingoffsetiterateES2016byteLengthlastWeakSetasteriskshookformcharacterstarterspeedflagscharactersmobilecloudtrailquoteemojiclienttslibTypedArrayassertionbinariesvaluesstringMapwalkshimreact-hooksslice_.extendfastclonemulti-packagebyteOffsetmoduleassertsuperstructhelperimportwalkingtransformletupparentsisConcatSpreadableavacomputed-typesgesturesdeepcopyECMAScript 2023deterministicObject.keystermgetoptdataamazonwhichzerotypesafetranspilerES7coreSymbolglobalThisresolveiteratormapargumentSymbol.toStringTagremoveRegExp#flagscss-in-jsdomtesting-0streamwarningerrorincludesvisuales-shim APIomitES2021spinnerscolumncallboundArrayBufferoptionparentnumbervariablesterminalutilitiesCSSStyleDeclarationglobalsargvboundglobal objectreduxserializersimpledblocationsuperagentawskey[[Prototype]]compilerutil.inspectutilstyped arrayexecutenativesameValueZerogenericsescapeArrayBuffer.prototype.slicereadableflagObject.entrieses-abstractyamlWebSocketspringcloudformationproxyvarsstreamsparserlibphonenumbermanagerinstallerWeakMapjasminestoragegatewaydirtakereworkfind-uptimepretty
8.8.94

1 year ago

8.8.93

1 year ago

8.8.91

1 year ago

8.8.92

1 year ago

8.7.91

1 year ago

7.7.91

1 year ago

7.7.90

1 year ago

7.7.89

1 year ago

7.7.88

1 year ago

7.7.87

1 year ago

7.6.87

1 year ago

6.6.87

1 year ago

6.6.86

1 year ago

6.6.85

1 year ago

6.6.84

1 year ago

6.6.83

1 year ago

6.6.82

1 year ago

6.6.81

1 year ago

6.6.80

1 year ago

6.6.79

1 year ago

6.6.78

1 year ago

6.6.77

1 year ago

6.6.76

1 year ago

5.6.76

1 year ago

5.6.75

1 year ago

5.6.74

1 year ago

5.6.73

1 year ago

5.6.72

1 year ago

5.6.71

1 year ago

5.6.70

1 year ago

5.6.69

1 year ago

5.6.68

1 year ago

5.6.67

1 year ago

5.6.66

1 year ago

5.6.65

1 year ago

5.6.64

1 year ago

5.6.63

1 year ago

5.6.62

1 year ago

5.6.61

1 year ago

5.6.60

1 year ago

4.6.60

1 year ago

4.6.59

1 year ago

4.6.58

1 year ago

4.6.57

1 year ago

4.6.56

1 year ago

4.6.55

1 year ago

4.6.54

1 year ago

4.6.53

1 year ago

4.6.52

1 year ago

4.6.51

1 year ago

4.6.50

1 year ago

4.6.49

1 year ago

4.6.48

1 year ago

3.6.48

1 year ago

3.5.48

1 year ago

3.5.47

1 year ago

3.5.46

1 year ago

3.5.45

1 year ago

3.5.44

1 year ago

3.5.43

1 year ago

3.5.42

1 year ago

3.5.41

1 year ago

3.5.40

1 year ago

3.5.39

1 year ago

3.5.38

1 year ago

3.5.37

1 year ago

3.5.36

1 year ago

3.5.35

1 year ago

3.5.34

1 year ago

3.5.33

1 year ago

3.5.32

1 year ago

3.5.31

1 year ago

3.5.30

1 year ago

3.4.30

1 year ago

3.4.29

1 year ago

2.4.29

1 year ago

2.4.28

1 year ago

2.4.27

1 year ago

2.4.26

1 year ago

2.4.25

1 year ago

2.4.24

1 year ago

2.4.23

1 year ago

2.3.23

1 year ago

2.3.22

1 year ago

2.3.21

1 year ago

2.3.20

1 year ago

2.3.19

1 year ago

2.3.18

1 year ago

2.3.17

1 year ago

2.3.16

1 year ago

2.3.15

1 year ago

2.2.15

1 year ago

2.2.14

1 year ago

2.2.13

1 year ago

2.2.12

1 year ago

2.2.11

1 year ago

2.2.10

1 year ago

2.2.9

1 year ago

2.2.8

1 year ago

2.2.7

1 year ago

2.2.6

1 year ago

2.1.6

1 year ago

2.1.5

1 year ago

2.0.5

1 year ago

2.0.4

1 year ago

2.0.3

1 year ago

2.0.2

1 year ago

2.0.1

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago