@@ -52,12 +52,12 @@ function ratio(part, total) {
5252}
5353
5454let defaults = {
55- useUnstableLocations : false
55+ useLocations : false
5656}
5757
5858/**
5959 * @typedef Options
60- * @property {boolean } useUnstableLocations **WARNING: EXPERIMENTAL!** Use Locations (`{ 'item': [{ line, column, offset, length }] }`) instead of a regular count per occurrence (`{ 'item': 3 }`)
60+ * @property {boolean } useLocations Use Locations (`{ 'item': [{ line, column, offset, length }] }`) instead of a regular count per occurrence (`{ 'item': 3 }`)
6161 */
6262
6363/**
@@ -67,7 +67,7 @@ let defaults = {
6767 */
6868export function analyze ( css , options = { } ) {
6969 let settings = Object . assign ( { } , defaults , options )
70- let useLocations = settings . useUnstableLocations === true
70+ let useLocations = settings . useLocations === true
7171 let start = Date . now ( )
7272
7373 /**
@@ -91,7 +91,7 @@ export function analyze(css, options = {}) {
9191 let embedSize = 0
9292 let embedTypes = {
9393 total : 0 ,
94- /** @type {Map<string, { size: number, count: number } & ({ __unstable__uniqueWithLocations ?: undefined } | ({ __unstable__uniqueWithLocations : { offset: number, line: number, column: number, length: number }[] })) }>} */
94+ /** @type {Map<string, { size: number, count: number } & ({ uniqueWithLocations ?: undefined } | ({ uniqueWithLocations : { offset: number, line: number, column: number, length: number }[] })) }>} */
9595 unique : new Map ( )
9696 }
9797
@@ -415,15 +415,15 @@ export function analyze(css, options = {}) {
415415 item . size += size
416416 embedTypes . unique . set ( type , item )
417417 if ( useLocations ) {
418- item . __unstable__uniqueWithLocations . push ( loc )
418+ item . uniqueWithLocations . push ( loc )
419419 }
420420 } else {
421421 let item = {
422422 count : 1 ,
423423 size
424424 }
425425 if ( useLocations ) {
426- item . __unstable__uniqueWithLocations = [ loc ]
426+ item . uniqueWithLocations = [ loc ]
427427 }
428428 embedTypes . unique . set ( type , item )
429429 }
@@ -694,7 +694,7 @@ export function analyze(css, options = {}) {
694694 } )
695695
696696 let embeddedContent = embeds . c ( )
697- delete embeddedContent . __unstable__uniqueWithLocations
697+ delete embeddedContent . uniqueWithLocations
698698
699699 let totalUniqueDeclarations = uniqueDeclarations . size
700700
@@ -742,7 +742,7 @@ export function analyze(css, options = {}) {
742742 unique : fontfaces ,
743743 uniquenessRatio : fontFacesCount === 0 ? 0 : 1 ,
744744 } , useLocations ? {
745- __unstable__uniqueWithLocations : fontfaces_with_loc . c ( ) . __unstable__uniqueWithLocations ,
745+ uniqueWithLocations : fontfaces_with_loc . c ( ) . uniqueWithLocations ,
746746 } : { } ) ,
747747 import : imports . c ( ) ,
748748 media : assign (
0 commit comments