format: prettify entire project
This commit is contained in:
22
node_modules/to-fast-properties/index.js
generated
vendored
22
node_modules/to-fast-properties/index.js
generated
vendored
@ -7,21 +7,21 @@ let fastProto = null;
|
||||
// for more details. Use %HasFastProperties(object) and the Node.js flag
|
||||
// --allow-natives-syntax to check whether an object has fast properties.
|
||||
function FastObject(o) {
|
||||
// A prototype object will have "fast properties" enabled once it is checked
|
||||
// against the inline property cache of a function, e.g. fastProto.property:
|
||||
// https://github.com/v8/v8/blob/6.0.122/test/mjsunit/fast-prototype.js#L48-L63
|
||||
if (fastProto !== null && typeof fastProto.property) {
|
||||
const result = fastProto;
|
||||
fastProto = FastObject.prototype = null;
|
||||
return result;
|
||||
}
|
||||
fastProto = FastObject.prototype = o == null ? Object.create(null) : o;
|
||||
return new FastObject;
|
||||
// A prototype object will have "fast properties" enabled once it is checked
|
||||
// against the inline property cache of a function, e.g. fastProto.property:
|
||||
// https://github.com/v8/v8/blob/6.0.122/test/mjsunit/fast-prototype.js#L48-L63
|
||||
if (fastProto !== null && typeof fastProto.property) {
|
||||
const result = fastProto;
|
||||
fastProto = FastObject.prototype = null;
|
||||
return result;
|
||||
}
|
||||
fastProto = FastObject.prototype = o == null ? Object.create(null) : o;
|
||||
return new FastObject();
|
||||
}
|
||||
|
||||
// Initialize the inline property cache of FastObject
|
||||
FastObject();
|
||||
|
||||
module.exports = function toFastproperties(o) {
|
||||
return FastObject(o);
|
||||
return FastObject(o);
|
||||
};
|
||||
|
Reference in New Issue
Block a user