mirror of
https://github.com/S2-/minifyfromhtml.git
synced 2025-08-03 20:30:04 +02:00
add some packages
This commit is contained in:
51
node_modules/core-js/modules/_metadata.js
generated
vendored
Normal file
51
node_modules/core-js/modules/_metadata.js
generated
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
var Map = require('./es6.map');
|
||||
var $export = require('./_export');
|
||||
var shared = require('./_shared')('metadata');
|
||||
var store = shared.store || (shared.store = new (require('./es6.weak-map'))());
|
||||
|
||||
var getOrCreateMetadataMap = function (target, targetKey, create) {
|
||||
var targetMetadata = store.get(target);
|
||||
if (!targetMetadata) {
|
||||
if (!create) return undefined;
|
||||
store.set(target, targetMetadata = new Map());
|
||||
}
|
||||
var keyMetadata = targetMetadata.get(targetKey);
|
||||
if (!keyMetadata) {
|
||||
if (!create) return undefined;
|
||||
targetMetadata.set(targetKey, keyMetadata = new Map());
|
||||
} return keyMetadata;
|
||||
};
|
||||
var ordinaryHasOwnMetadata = function (MetadataKey, O, P) {
|
||||
var metadataMap = getOrCreateMetadataMap(O, P, false);
|
||||
return metadataMap === undefined ? false : metadataMap.has(MetadataKey);
|
||||
};
|
||||
var ordinaryGetOwnMetadata = function (MetadataKey, O, P) {
|
||||
var metadataMap = getOrCreateMetadataMap(O, P, false);
|
||||
return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey);
|
||||
};
|
||||
var ordinaryDefineOwnMetadata = function (MetadataKey, MetadataValue, O, P) {
|
||||
getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue);
|
||||
};
|
||||
var ordinaryOwnMetadataKeys = function (target, targetKey) {
|
||||
var metadataMap = getOrCreateMetadataMap(target, targetKey, false);
|
||||
var keys = [];
|
||||
if (metadataMap) metadataMap.forEach(function (_, key) { keys.push(key); });
|
||||
return keys;
|
||||
};
|
||||
var toMetaKey = function (it) {
|
||||
return it === undefined || typeof it == 'symbol' ? it : String(it);
|
||||
};
|
||||
var exp = function (O) {
|
||||
$export($export.S, 'Reflect', O);
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
store: store,
|
||||
map: getOrCreateMetadataMap,
|
||||
has: ordinaryHasOwnMetadata,
|
||||
get: ordinaryGetOwnMetadata,
|
||||
set: ordinaryDefineOwnMetadata,
|
||||
keys: ordinaryOwnMetadataKeys,
|
||||
key: toMetaKey,
|
||||
exp: exp
|
||||
};
|
Reference in New Issue
Block a user