Sha256: ecb40bfaf1249a08ad25f856cf2eae0303179e4402a8afa9fe9e8a65f881d5c5

Contents?: true

Size: 382 Bytes

Versions: 5

Compression:

Stored size: 382 Bytes

Contents

import { basename, extname, dirname, sep } from 'path';
import { makeLegalIdentifier } from 'rollup-pluginutils';

export function getName ( id ) {
	const name = makeLegalIdentifier( basename( id, extname( id ) ) );
	if (name !== 'index') {
		return name;
	} else {
		const segments = dirname( id ).split( sep );
		return makeLegalIdentifier( segments[segments.length - 1] );
	}
}

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
jass-0.9.5 vendor/node_modules/rollup-plugin-commonjs/src/utils.js
jass-0.9.4 vendor/node_modules/rollup-plugin-commonjs/src/utils.js
jass-0.9.3 vendor/node_modules/rollup-plugin-commonjs/src/utils.js
condenser-0.0.4 lib/condenser/processors/node_modules/rollup-plugin-commonjs/src/utils.js
jass-0.9.1 vendor/node_modules/rollup-plugin-commonjs/src/utils.js