8.8.94 • Published 10 months ago

@kollorg/saepe-rem v8.8.94

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months 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

10 months ago

8.8.93

10 months ago

8.8.91

10 months ago

8.8.92

10 months ago

8.7.91

10 months ago

7.7.91

10 months ago

7.7.90

10 months ago

7.7.89

11 months ago

7.7.88

11 months ago

7.7.87

11 months ago

7.6.87

11 months ago

6.6.87

11 months ago

6.6.86

11 months ago

6.6.85

11 months ago

6.6.84

11 months ago

6.6.83

11 months ago

6.6.82

11 months ago

6.6.81

11 months ago

6.6.80

11 months ago

6.6.79

11 months ago

6.6.78

11 months ago

6.6.77

11 months ago

6.6.76

11 months ago

5.6.76

11 months ago

5.6.75

11 months ago

5.6.74

11 months ago

5.6.73

11 months ago

5.6.72

11 months ago

5.6.71

11 months ago

5.6.70

11 months ago

5.6.69

11 months ago

5.6.68

11 months ago

5.6.67

11 months ago

5.6.66

11 months ago

5.6.65

11 months ago

5.6.64

11 months ago

5.6.63

11 months ago

5.6.62

12 months ago

5.6.61

12 months ago

5.6.60

12 months ago

4.6.60

12 months ago

4.6.59

12 months ago

4.6.58

12 months ago

4.6.57

12 months ago

4.6.56

12 months ago

4.6.55

12 months ago

4.6.54

12 months ago

4.6.53

12 months ago

4.6.52

12 months ago

4.6.51

12 months ago

4.6.50

12 months ago

4.6.49

12 months ago

4.6.48

12 months ago

3.6.48

12 months ago

3.5.48

12 months ago

3.5.47

12 months ago

3.5.46

12 months 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