Sha256: 0818129b558ef95e118262299a1f9ff07d45d5a655334c8abe5a77e4013f214f

Contents?: true

Size: 152 Bytes

Versions: 14

Compression:

Stored size: 152 Bytes

Contents

export default function ensureArray ( thing ) {
	if ( Array.isArray( thing ) ) return thing;
	if ( thing == undefined ) return [];
	return [ thing ];
}

Version data entries

14 entries across 10 versions & 4 rubygems

Version Path
jass-0.9.5 vendor/node_modules/rollup-pluginutils/src/utils/ensureArray.js
jass-0.9.4 vendor/node_modules/rollup-pluginutils/src/utils/ensureArray.js
jass-vue-0.4.0 vendor/node_modules/rollup-pluginutils/src/utils/ensureArray.js
jass-vue-0.4.0 vendor/node_modules/rollup-plugin-replace/node_modules/rollup-pluginutils/src/utils/ensureArray.js
jass-vue-0.3.0 vendor/node_modules/rollup-pluginutils/src/utils/ensureArray.js
jass-vue-0.3.0 vendor/node_modules/rollup-plugin-replace/node_modules/rollup-pluginutils/src/utils/ensureArray.js
jass-0.9.3 vendor/node_modules/rollup-pluginutils/src/utils/ensureArray.js
condenser-0.0.4 lib/condenser/processors/node_modules/rollup-pluginutils/src/utils/ensureArray.js
jass-vue-0.2.1 vendor/node_modules/rollup-pluginutils/src/utils/ensureArray.js
jass-0.9.1 vendor/node_modules/rollup-pluginutils/src/utils/ensureArray.js
es6_tilt-0.1.2 test/dummy/node_modules/rollup-pluginutils/src/utils/ensureArray.js
es6_tilt-0.1.2 test/dummy/node_modules/rollup/src/utils/ensureArray.js
es6_tilt-0.1.1 test/dummy/node_modules/rollup/src/utils/ensureArray.js
es6_tilt-0.1.1 test/dummy/node_modules/rollup-pluginutils/src/utils/ensureArray.js