Sha256: bd7baeaddf2f916e50d6c819ea3d8356c0beaa194fbd2431d596b35c243a2946
Contents?: true
Size: 704 Bytes
Versions: 64
Compression:
Stored size: 704 Bytes
Contents
var metadata = require('./_metadata'); var anObject = require('./_an-object'); var toMetaKey = metadata.key; var getOrCreateMetadataMap = metadata.map; var store = metadata.store; metadata.exp({ deleteMetadata: function deleteMetadata(metadataKey, target /* , targetKey */) { var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2]); var metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false); if (metadataMap === undefined || !metadataMap['delete'](metadataKey)) return false; if (metadataMap.size) return true; var targetMetadata = store.get(target); targetMetadata['delete'](targetKey); return !!targetMetadata.size || store['delete'](target); } });
Version data entries
64 entries across 29 versions & 8 rubygems