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

Version Path
affiliator-0.2.1 node_modules/core-js/library/modules/es7.reflect.delete-metadata.js
affiliator-0.2.1 node_modules/core-js/modules/es7.reflect.delete-metadata.js
lanes-0.8.0 node_modules/babel-register/node_modules/core-js/modules/es7.reflect.delete-metadata.js
lanes-0.8.0 node_modules/babel-runtime/node_modules/core-js/library/modules/es7.reflect.delete-metadata.js
lanes-0.8.0 node_modules/babel-runtime/node_modules/core-js/modules/es7.reflect.delete-metadata.js
lanes-0.8.0 node_modules/babel-register/node_modules/core-js/library/modules/es7.reflect.delete-metadata.js
babel-schmooze-sprockets-0.1.3 node_modules/babel-helper-get-function-arity/node_modules/core-js/modules/es7.reflect.delete-metadata.js
babel-schmooze-sprockets-0.1.3 node_modules/babel-helper-function-name/node_modules/core-js/library/modules/es7.reflect.delete-metadata.js
babel-schmooze-sprockets-0.1.3 node_modules/babel-helper-hoist-variables/node_modules/core-js/library/modules/es7.reflect.delete-metadata.js
babel-schmooze-sprockets-0.1.3 node_modules/babel-helper-call-delegate/node_modules/core-js/library/modules/es7.reflect.delete-metadata.js
babel-schmooze-sprockets-0.1.3 node_modules/babel-generator/node_modules/core-js/modules/es7.reflect.delete-metadata.js
babel-schmooze-sprockets-0.1.3 node_modules/babel-helper-define-map/node_modules/core-js/modules/es7.reflect.delete-metadata.js
babel-schmooze-sprockets-0.1.3 node_modules/babel-helper-function-name/node_modules/core-js/modules/es7.reflect.delete-metadata.js
babel-schmooze-sprockets-0.1.3 node_modules/babel-helper-get-function-arity/node_modules/core-js/library/modules/es7.reflect.delete-metadata.js
babel-schmooze-sprockets-0.1.3 node_modules/babel-helper-call-delegate/node_modules/core-js/modules/es7.reflect.delete-metadata.js
babel-schmooze-sprockets-0.1.3 node_modules/babel-core/node_modules/core-js/library/modules/es7.reflect.delete-metadata.js
babel-schmooze-sprockets-0.1.3 node_modules/babel-core/node_modules/core-js/modules/es7.reflect.delete-metadata.js
babel-schmooze-sprockets-0.1.3 node_modules/babel-code-frame/node_modules/core-js/library/modules/es7.reflect.delete-metadata.js
babel-schmooze-sprockets-0.1.3 node_modules/babel-code-frame/node_modules/core-js/modules/es7.reflect.delete-metadata.js
babel-schmooze-sprockets-0.1.3 node_modules/babel-generator/node_modules/core-js/library/modules/es7.reflect.delete-metadata.js