Sha256: 95c5dd26d59f3f0f2735ea2eb8c9c93e37b27b5730590d9a31ed71348350591c
Contents?: true
Size: 750 Bytes
Versions: 320
Compression:
Stored size: 750 Bytes
Contents
var metadata = require('./_metadata') , anObject = require('./_an-object') , toMetaKey = metadata.key , getOrCreateMetadataMap = metadata.map , store = metadata.store; metadata.exp({deleteMetadata: function deleteMetadata(metadataKey, target /*, targetKey */){ var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2]) , 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
320 entries across 8 versions & 3 rubygems