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

Version Path
optimacms-0.4.3 spec/dummy/node_modules/core-js/modules/es7.reflect.delete-metadata.js
optimacms-0.4.3 spec/dummy/node_modules/core-js/library/modules/es7.reflect.delete-metadata.js
optimacms-0.4.2 spec/dummy/node_modules/core-js/library/modules/es7.reflect.delete-metadata.js
optimacms-0.4.2 spec/dummy/node_modules/core-js/modules/es7.reflect.delete-metadata.js
locomotivecms-4.0.0.alpha1 app/javascript/node_modules/core-js/modules/es7.reflect.delete-metadata.js
locomotivecms-4.0.0.alpha1 app/javascript/node_modules/core-js/library/modules/es7.reflect.delete-metadata.js
lux_assets-0.2.11 ./node_modules/core-js/modules/es7.reflect.delete-metadata.js
lux_assets-0.2.11 ./node_modules/core-js/library/modules/es7.reflect.delete-metadata.js
lux_assets-0.2.9 ./node_modules/core-js/modules/es7.reflect.delete-metadata.js
lux_assets-0.2.9 ./node_modules/core-js/library/modules/es7.reflect.delete-metadata.js
lux_assets-0.2.4 ./node_modules/core-js/library/modules/es7.reflect.delete-metadata.js
lux_assets-0.2.4 ./node_modules/core-js/modules/es7.reflect.delete-metadata.js
lux_assets-0.2.2 ./node_modules/core-js/library/modules/es7.reflect.delete-metadata.js
lux_assets-0.2.2 ./node_modules/core-js/modules/es7.reflect.delete-metadata.js
lux_assets-0.2.1 ./node_modules/core-js/modules/es7.reflect.delete-metadata.js
lux_assets-0.2.1 ./node_modules/core-js/library/modules/es7.reflect.delete-metadata.js
locomotivecms-3.4.0 app/javascript/node_modules/core-js/modules/es7.reflect.delete-metadata.js
locomotivecms-3.4.0 app/javascript/node_modules/core-js/library/modules/es7.reflect.delete-metadata.js
cortex-0.1.3 spec/dummy/node_modules/core-js/library/modules/es7.reflect.delete-metadata.js
cortex-0.1.3 spec/dummy/node_modules/core-js/modules/es7.reflect.delete-metadata.js