format: prettify entire project
This commit is contained in:
8
node_modules/source-map-js/lib/array-set.js
generated
vendored
8
node_modules/source-map-js/lib/array-set.js
generated
vendored
@ -7,7 +7,7 @@
|
||||
|
||||
var util = require('./util');
|
||||
var has = Object.prototype.hasOwnProperty;
|
||||
var hasNativeMap = typeof Map !== "undefined";
|
||||
var hasNativeMap = typeof Map !== 'undefined';
|
||||
|
||||
/**
|
||||
* A data structure which is a combination of an array and a set. Adding a new
|
||||
@ -38,7 +38,9 @@ ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {
|
||||
* @returns Number
|
||||
*/
|
||||
ArraySet.prototype.size = function ArraySet_size() {
|
||||
return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;
|
||||
return hasNativeMap ?
|
||||
this._set.size
|
||||
: Object.getOwnPropertyNames(this._set).length;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -85,7 +87,7 @@ ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {
|
||||
if (hasNativeMap) {
|
||||
var idx = this._set.get(aStr);
|
||||
if (idx >= 0) {
|
||||
return idx;
|
||||
return idx;
|
||||
}
|
||||
} else {
|
||||
var sStr = util.toSetString(aStr);
|
||||
|
Reference in New Issue
Block a user