Sha256: bef420c8b9a03d0cf1ec02c0778246fed1ad4fdfb319973862ab2f660908b6ad
Contents?: true
Size: 761 Bytes
Versions: 64
Compression:
Stored size: 761 Bytes
Contents
var metadata = require('./_metadata'); var anObject = require('./_an-object'); var getPrototypeOf = require('./_object-gpo'); var ordinaryHasOwnMetadata = metadata.has; var ordinaryGetOwnMetadata = metadata.get; var toMetaKey = metadata.key; var ordinaryGetMetadata = function (MetadataKey, O, P) { var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); if (hasOwn) return ordinaryGetOwnMetadata(MetadataKey, O, P); var parent = getPrototypeOf(O); return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined; }; metadata.exp({ getMetadata: function getMetadata(metadataKey, target /* , targetKey */) { return ordinaryGetMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2])); } });
Version data entries
64 entries across 29 versions & 8 rubygems