Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

aurelia-metadata

Package Overview
Dependencies
Maintainers
3
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aurelia-metadata - npm Package Compare versions

Comparing version 1.0.0-rc.1.0.0 to 1.0.0-rc.1.0.1

2

bower.json
{
"name": "aurelia-metadata",
"version": "1.0.0-rc.1.0.0",
"version": "1.0.0-rc.1.0.1",
"description": "Utilities for reading and writing the metadata of JavaScript functions.",

@@ -5,0 +5,0 @@ "keywords": [

System.config({
defaultJSExtensions: true,
transpiler: "babel",
babelOptions: {
"optional": [
"runtime",
"es7.decorators"
]
},
paths: {

@@ -11,0 +4,0 @@ "github:*": "jspm_packages/github/*",

@@ -32,2 +32,3 @@ define(['exports', 'aurelia-pal'], function (exports, _aureliaPal) {

paramTypes: 'design:paramtypes',
propertyType: 'design:type',
properties: 'design:properties',

@@ -34,0 +35,0 @@ get: function get(metadataKey, target, targetKey) {

@@ -7,2 +7,4 @@ import {

* Helpers for working with metadata on functions.
*
* Note for the Typescript to ES5 transpiler: Due to the non-standard compliant implementation of 'extends', these methods, when applied to derived classes, will operate on the parent class and not on the child class. This can be circumvented by either transpiling to ES2015 (ES6) or by making the targetKey parameter class-specific eg. by using target.name for the targetKey parameter.
*/

@@ -22,2 +24,7 @@ export declare interface MetadataType {

/**
* The metadata key representing object property type information.
*/
propertyType: string;
/**
* The metadata key representing property information.

@@ -24,0 +31,0 @@ */

@@ -5,2 +5,4 @@ import {PLATFORM} from 'aurelia-pal';

* Helpers for working with metadata on functions.
*
* Note for the Typescript to ES5 transpiler: Due to the non-standard compliant implementation of 'extends', these methods, when applied to derived classes, will operate on the parent class and not on the child class. This can be circumvented by either transpiling to ES2015 (ES6) or by making the targetKey parameter class-specific eg. by using target.name for the targetKey parameter.
*/

@@ -17,2 +19,6 @@ interface MetadataType {

/**
* The metadata key representing object property type information.
*/
propertyType: string;
/**
* The metadata key representing property information.

@@ -58,2 +64,3 @@ */

paramTypes: 'design:paramtypes',
propertyType: 'design:type',
properties: 'design:properties',

@@ -60,0 +67,0 @@ get(metadataKey: string, target: Function, targetKey?: string): Object {

@@ -22,2 +22,3 @@ 'use strict';

paramTypes: 'design:paramtypes',
propertyType: 'design:type',
properties: 'design:properties',

@@ -24,0 +25,0 @@ get: function get(metadataKey, target, targetKey) {

@@ -8,2 +8,3 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

paramTypes: 'design:paramtypes',
propertyType: 'design:type',
properties: 'design:properties',

@@ -10,0 +11,0 @@ get(metadataKey, target, targetKey) {

@@ -10,2 +10,3 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

paramTypes: 'design:paramtypes',
propertyType: 'design:type',
properties: 'design:properties',

@@ -12,0 +13,0 @@ get: function get(metadataKey, target, targetKey) {

@@ -73,2 +73,3 @@ 'use strict';

paramTypes: 'design:paramtypes',
propertyType: 'design:type',
properties: 'design:properties',

@@ -75,0 +76,0 @@ get: function get(metadataKey, target, targetKey) {

@@ -1,1 +0,1 @@

{"name":"aurelia-metadata","children":[{"id":46,"name":"Origin","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"A metadata annotation that describes the origin module of the function to which it's attached."},"children":[{"id":49,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"comment":{"shortText":"Creates an instance of Origin metadata."},"signatures":[{"id":50,"name":"new Origin","kind":16384,"kindString":"Constructor signature","flags":{},"comment":{"shortText":"Creates an instance of Origin metadata."},"parameters":[{"id":51,"name":"moduleId","kind":32768,"kindString":"Parameter","flags":{},"comment":{"shortText":"The id of the module from which the item originated."},"type":{"type":"instrinct","name":"string"}},{"id":52,"name":"moduleMember","kind":32768,"kindString":"Parameter","flags":{},"comment":{"shortText":"The member name of the export on the module object from which the item originated.\n"},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"reference","name":"Origin","id":46}}]},{"id":47,"name":"moduleId","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The id of the module from which the item originated."},"type":{"type":"instrinct","name":"string"}},{"id":48,"name":"moduleMember","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The member name of the export on the module object from which the item originated."},"type":{"type":"instrinct","name":"string"}},{"id":53,"name":"get","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":54,"name":"get","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Get the Origin metadata for the specified function.","returns":"Returns the Origin metadata.\n"},"parameters":[{"id":55,"name":"fn","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The function to inspect for Origin metadata."},"type":{"type":"reference","name":"Function"}}],"type":{"type":"reference","name":"Origin","id":46}}]},{"id":56,"name":"set","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":57,"name":"set","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Set the Origin metadata for the specified function.","returns":"Returns the Origin metadata.\n"},"parameters":[{"id":58,"name":"fn","kind":32768,"kindString":"Parameter","flags":{},"comment":{"shortText":"The Origin metadata to store on the function."},"type":{"type":"reference","name":"Function"}},{"id":59,"name":"origin","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Origin","id":46}}],"type":{"type":"instrinct","name":"void"}}]}],"groups":[{"title":"Constructors","kind":512,"children":[49]},{"title":"Properties","kind":1024,"children":[47,48]},{"title":"Methods","kind":2048,"children":[53,56]}]},{"id":28,"name":"DecoratorApplicator","kind":256,"kindString":"Interface","flags":{"isExported":true},"comment":{"shortText":"An object capable of applying it's captured decorators to a target."},"children":[{"id":29,"name":"on","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":30,"name":"on","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies the decorators to the target."},"parameters":[{"id":31,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The target."},"type":{"type":"instrinct","name":"any"}},{"id":32,"name":"key","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"shortText":"If applying to a method, you may supply an initial descriptor to pass to the decorators.\n"},"type":{"type":"instrinct","name":"string"}},{"id":33,"name":"descriptor","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","name":"Object"}}],"type":{"type":"instrinct","name":"any"}}]}],"groups":[{"title":"Methods","kind":2048,"children":[29]}]},{"id":34,"name":"DeprecatedOptions","kind":256,"kindString":"Interface","flags":{"isExported":true},"comment":{"shortText":"Options that control how the deprected decorator should function at runtime."},"children":[{"id":36,"name":"error","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"Specifies whether or not the deprecation should throw an error."},"type":{"type":"instrinct","name":"boolean"}},{"id":35,"name":"message","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"Specifies a custom deprecation message."},"type":{"type":"instrinct","name":"string"}}],"groups":[{"title":"Properties","kind":1024,"children":[36,35]}]},{"id":2,"name":"MetadataType","kind":256,"kindString":"Interface","flags":{"isExported":true},"comment":{"shortText":"Helpers for working with metadata on functions."},"children":[{"id":4,"name":"paramTypes","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The metadata key representing parameter type information."},"type":{"type":"instrinct","name":"string"}},{"id":5,"name":"properties","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The metadata key representing property information."},"type":{"type":"instrinct","name":"string"}},{"id":3,"name":"resource","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The metadata key representing pluggable resources."},"type":{"type":"instrinct","name":"string"}},{"id":16,"name":"define","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":17,"name":"define","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Defines metadata specified by a key on a target."},"parameters":[{"id":18,"name":"metadataKey","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The key for the metadata to define."},"type":{"type":"instrinct","name":"string"}},{"id":19,"name":"metadataValue","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Object"}},{"id":20,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The target to set the metadata on."},"type":{"type":"reference","name":"Function"}},{"id":21,"name":"targetKey","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"The member on the target to set the metadata on.\n"},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"instrinct","name":"void"}}]},{"id":6,"name":"get","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":7,"name":"get","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Gets metadata specified by a key on a target, searching up the inheritance hierarchy."},"parameters":[{"id":8,"name":"metadataKey","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The key for the metadata to lookup."},"type":{"type":"instrinct","name":"string"}},{"id":9,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The target to lookup the metadata on."},"type":{"type":"reference","name":"Function"}},{"id":10,"name":"targetKey","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"The member on the target to lookup the metadata on.\n"},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"reference","name":"Object"}}]},{"id":22,"name":"getOrCreateOwn","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":23,"name":"getOrCreateOwn","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Gets metadata specified by a key on a target, or creates an instance of the specified metadata if not found."},"parameters":[{"id":24,"name":"metadataKey","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The key for the metadata to lookup or create."},"type":{"type":"instrinct","name":"string"}},{"id":25,"name":"Type","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The type of metadata to create if existing metadata is not found."},"type":{"type":"reference","name":"Function"}},{"id":26,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The target to lookup or create the metadata on."},"type":{"type":"reference","name":"Function"}},{"id":27,"name":"targetKey","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"The member on the target to lookup or create the metadata on.\n"},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"reference","name":"Object"}}]},{"id":11,"name":"getOwn","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":12,"name":"getOwn","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Gets metadata specified by a key on a target, only searching the own instance."},"parameters":[{"id":13,"name":"metadataKey","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The key for the metadata to lookup."},"type":{"type":"instrinct","name":"string"}},{"id":14,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The target to lookup the metadata on."},"type":{"type":"reference","name":"Function"}},{"id":15,"name":"targetKey","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"The member on the target to lookup the metadata on.\n"},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"reference","name":"Object"}}]}],"groups":[{"title":"Properties","kind":1024,"children":[4,5,3]},{"title":"Methods","kind":2048,"children":[16,6,22,11]}]},{"id":37,"name":"ProtocolOptions","kind":256,"kindString":"Interface","flags":{"isExported":true},"comment":{"shortText":"Options used during protocol creation."},"children":[{"id":42,"name":"compose","kind":1024,"kindString":"Property","flags":{"isExported":true,"isOptional":true},"comment":{"shortText":"A function which has the opportunity to compose additional behavior into the decorated class when the protocol is applied."},"type":{"type":"reflection","declaration":{"id":43,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":44,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":45,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"}}]}}},{"id":38,"name":"validate","kind":1024,"kindString":"Property","flags":{"isExported":true,"isOptional":true},"comment":{"shortText":"A function that will be run to validate the decorated class when the protocol is applied. It is also used to validate adhoc instances.\nIf the validation fails, a message should be returned which directs the developer in how to address the issue."},"type":{"type":"reflection","declaration":{"id":39,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":40,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":41,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"instrinct","name":"boolean"}]}}]}}}],"groups":[{"title":"Properties","kind":1024,"children":[42,38]}]},{"id":60,"name":"metadata","kind":32,"kindString":"Variable","flags":{"isExported":true},"comment":{"shortText":"Provides helpers for working with metadata."},"type":{"type":"reference","name":"MetadataType","id":2}},{"id":61,"name":"decorators","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":62,"name":"decorators","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Enables applying decorators, particularly for use when there is no syntax support in the language, such as with ES5 and ES2016."},"parameters":[{"id":63,"name":"rest","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"comment":{"text":"The decorators to apply.\n"},"type":{"type":"reference","isArray":true,"name":"Function"}}],"type":{"type":"reference","name":"DecoratorApplicator","id":28}}]},{"id":64,"name":"deprecated","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":65,"name":"deprecated","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Decorator: Enables marking methods as deprecated."},"parameters":[{"id":66,"name":"optionsOrTarget","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"Options for how the deprected decorator should function at runtime.\n"},"type":{"type":"reference","name":"DeprecatedOptions","id":34}},{"id":67,"name":"maybeKey","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"string"}},{"id":68,"name":"maybeDescriptor","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","name":"Object"}}],"type":{"type":"instrinct","name":"any"}}]},{"id":69,"name":"mixin","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":70,"name":"mixin","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Decorator: Enables mixing behaior into a class."},"parameters":[{"id":71,"name":"behavior","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"An object with keys for each method to mix into the target class.\n"},"type":{"type":"reference","name":"Object"}}],"type":{"type":"instrinct","name":"any"}}]},{"id":72,"name":"protocol","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":73,"name":"protocol","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Decorator: Creates a protocol."},"parameters":[{"id":74,"name":"name","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The name of the protocol."},"type":{"type":"instrinct","name":"string"}},{"id":75,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"The validation function or options object used in configuring the protocol.\n"},"type":{"type":"union","types":[{"type":"reflection","declaration":{"id":76,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":77,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":78,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"instrinct","name":"boolean"}]}}]}},{"type":"reference","name":"ProtocolOptions","id":37}]}}],"type":{"type":"instrinct","name":"any"}}]}],"groups":[{"title":"Classes","kind":128,"children":[46]},{"title":"Interfaces","kind":256,"children":[28,34,2,37]},{"title":"Variables","kind":32,"children":[60]},{"title":"Functions","kind":64,"children":[61,64,69,72]}]}
{"name":"aurelia-metadata","children":[{"id":47,"name":"Origin","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"A metadata annotation that describes the origin module of the function to which it's attached."},"children":[{"id":50,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"comment":{"shortText":"Creates an instance of Origin metadata."},"signatures":[{"id":51,"name":"new Origin","kind":16384,"kindString":"Constructor signature","flags":{},"comment":{"shortText":"Creates an instance of Origin metadata."},"parameters":[{"id":52,"name":"moduleId","kind":32768,"kindString":"Parameter","flags":{},"comment":{"shortText":"The id of the module from which the item originated."},"type":{"type":"instrinct","name":"string"}},{"id":53,"name":"moduleMember","kind":32768,"kindString":"Parameter","flags":{},"comment":{"shortText":"The member name of the export on the module object from which the item originated.\n"},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"reference","name":"Origin","id":47}}]},{"id":48,"name":"moduleId","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The id of the module from which the item originated."},"type":{"type":"instrinct","name":"string"}},{"id":49,"name":"moduleMember","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The member name of the export on the module object from which the item originated."},"type":{"type":"instrinct","name":"string"}},{"id":54,"name":"get","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":55,"name":"get","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Get the Origin metadata for the specified function.","returns":"Returns the Origin metadata.\n"},"parameters":[{"id":56,"name":"fn","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The function to inspect for Origin metadata."},"type":{"type":"reference","name":"Function"}}],"type":{"type":"reference","name":"Origin","id":47}}]},{"id":57,"name":"set","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":58,"name":"set","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Set the Origin metadata for the specified function.","returns":"Returns the Origin metadata.\n"},"parameters":[{"id":59,"name":"fn","kind":32768,"kindString":"Parameter","flags":{},"comment":{"shortText":"The Origin metadata to store on the function."},"type":{"type":"reference","name":"Function"}},{"id":60,"name":"origin","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Origin","id":47}}],"type":{"type":"instrinct","name":"void"}}]}],"groups":[{"title":"Constructors","kind":512,"children":[50]},{"title":"Properties","kind":1024,"children":[48,49]},{"title":"Methods","kind":2048,"children":[54,57]}]},{"id":29,"name":"DecoratorApplicator","kind":256,"kindString":"Interface","flags":{"isExported":true},"comment":{"shortText":"An object capable of applying it's captured decorators to a target."},"children":[{"id":30,"name":"on","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":31,"name":"on","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies the decorators to the target."},"parameters":[{"id":32,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The target."},"type":{"type":"instrinct","name":"any"}},{"id":33,"name":"key","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"shortText":"If applying to a method, you may supply an initial descriptor to pass to the decorators.\n"},"type":{"type":"instrinct","name":"string"}},{"id":34,"name":"descriptor","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","name":"Object"}}],"type":{"type":"instrinct","name":"any"}}]}],"groups":[{"title":"Methods","kind":2048,"children":[30]}]},{"id":35,"name":"DeprecatedOptions","kind":256,"kindString":"Interface","flags":{"isExported":true},"comment":{"shortText":"Options that control how the deprected decorator should function at runtime."},"children":[{"id":37,"name":"error","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"Specifies whether or not the deprecation should throw an error."},"type":{"type":"instrinct","name":"boolean"}},{"id":36,"name":"message","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"Specifies a custom deprecation message."},"type":{"type":"instrinct","name":"string"}}],"groups":[{"title":"Properties","kind":1024,"children":[37,36]}]},{"id":2,"name":"MetadataType","kind":256,"kindString":"Interface","flags":{"isExported":true},"comment":{"shortText":"Helpers for working with metadata on functions.","text":"Note for the Typescript to ES5 transpiler: Due to the non-standard compliant implementation of 'extends', these methods, when applied to derived classes, will operate on the parent class and not on the child class. This can be circumvented by either transpiling to ES2015 (ES6) or by making the targetKey parameter class-specific eg. by using target.name for the targetKey parameter.\n"},"children":[{"id":4,"name":"paramTypes","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The metadata key representing parameter type information."},"type":{"type":"instrinct","name":"string"}},{"id":6,"name":"properties","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The metadata key representing property information."},"type":{"type":"instrinct","name":"string"}},{"id":5,"name":"propertyType","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The metadata key representing object property type information."},"type":{"type":"instrinct","name":"string"}},{"id":3,"name":"resource","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The metadata key representing pluggable resources."},"type":{"type":"instrinct","name":"string"}},{"id":17,"name":"define","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":18,"name":"define","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Defines metadata specified by a key on a target."},"parameters":[{"id":19,"name":"metadataKey","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The key for the metadata to define."},"type":{"type":"instrinct","name":"string"}},{"id":20,"name":"metadataValue","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Object"}},{"id":21,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The target to set the metadata on."},"type":{"type":"reference","name":"Function"}},{"id":22,"name":"targetKey","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"The member on the target to set the metadata on.\n"},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"instrinct","name":"void"}}]},{"id":7,"name":"get","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":8,"name":"get","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Gets metadata specified by a key on a target, searching up the inheritance hierarchy."},"parameters":[{"id":9,"name":"metadataKey","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The key for the metadata to lookup."},"type":{"type":"instrinct","name":"string"}},{"id":10,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The target to lookup the metadata on."},"type":{"type":"reference","name":"Function"}},{"id":11,"name":"targetKey","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"The member on the target to lookup the metadata on.\n"},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"reference","name":"Object"}}]},{"id":23,"name":"getOrCreateOwn","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":24,"name":"getOrCreateOwn","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Gets metadata specified by a key on a target, or creates an instance of the specified metadata if not found."},"parameters":[{"id":25,"name":"metadataKey","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The key for the metadata to lookup or create."},"type":{"type":"instrinct","name":"string"}},{"id":26,"name":"Type","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The type of metadata to create if existing metadata is not found."},"type":{"type":"reference","name":"Function"}},{"id":27,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The target to lookup or create the metadata on."},"type":{"type":"reference","name":"Function"}},{"id":28,"name":"targetKey","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"The member on the target to lookup or create the metadata on.\n"},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"reference","name":"Object"}}]},{"id":12,"name":"getOwn","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":13,"name":"getOwn","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Gets metadata specified by a key on a target, only searching the own instance."},"parameters":[{"id":14,"name":"metadataKey","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The key for the metadata to lookup."},"type":{"type":"instrinct","name":"string"}},{"id":15,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The target to lookup the metadata on."},"type":{"type":"reference","name":"Function"}},{"id":16,"name":"targetKey","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"The member on the target to lookup the metadata on.\n"},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"reference","name":"Object"}}]}],"groups":[{"title":"Properties","kind":1024,"children":[4,6,5,3]},{"title":"Methods","kind":2048,"children":[17,7,23,12]}]},{"id":38,"name":"ProtocolOptions","kind":256,"kindString":"Interface","flags":{"isExported":true},"comment":{"shortText":"Options used during protocol creation."},"children":[{"id":43,"name":"compose","kind":1024,"kindString":"Property","flags":{"isExported":true,"isOptional":true},"comment":{"shortText":"A function which has the opportunity to compose additional behavior into the decorated class when the protocol is applied."},"type":{"type":"reflection","declaration":{"id":44,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":45,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":46,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"}}]}}},{"id":39,"name":"validate","kind":1024,"kindString":"Property","flags":{"isExported":true,"isOptional":true},"comment":{"shortText":"A function that will be run to validate the decorated class when the protocol is applied. It is also used to validate adhoc instances.\nIf the validation fails, a message should be returned which directs the developer in how to address the issue."},"type":{"type":"reflection","declaration":{"id":40,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":41,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":42,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"instrinct","name":"boolean"}]}}]}}}],"groups":[{"title":"Properties","kind":1024,"children":[43,39]}]},{"id":61,"name":"metadata","kind":32,"kindString":"Variable","flags":{"isExported":true},"comment":{"shortText":"Provides helpers for working with metadata."},"type":{"type":"reference","name":"MetadataType","id":2}},{"id":62,"name":"decorators","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":63,"name":"decorators","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Enables applying decorators, particularly for use when there is no syntax support in the language, such as with ES5 and ES2016."},"parameters":[{"id":64,"name":"rest","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"comment":{"text":"The decorators to apply.\n"},"type":{"type":"reference","isArray":true,"name":"Function"}}],"type":{"type":"reference","name":"DecoratorApplicator","id":29}}]},{"id":65,"name":"deprecated","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":66,"name":"deprecated","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Decorator: Enables marking methods as deprecated."},"parameters":[{"id":67,"name":"optionsOrTarget","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"Options for how the deprected decorator should function at runtime.\n"},"type":{"type":"reference","name":"DeprecatedOptions","id":35}},{"id":68,"name":"maybeKey","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"string"}},{"id":69,"name":"maybeDescriptor","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","name":"Object"}}],"type":{"type":"instrinct","name":"any"}}]},{"id":70,"name":"mixin","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":71,"name":"mixin","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Decorator: Enables mixing behaior into a class."},"parameters":[{"id":72,"name":"behavior","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"An object with keys for each method to mix into the target class.\n"},"type":{"type":"reference","name":"Object"}}],"type":{"type":"instrinct","name":"any"}}]},{"id":73,"name":"protocol","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":74,"name":"protocol","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Decorator: Creates a protocol."},"parameters":[{"id":75,"name":"name","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The name of the protocol."},"type":{"type":"instrinct","name":"string"}},{"id":76,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"The validation function or options object used in configuring the protocol.\n"},"type":{"type":"union","types":[{"type":"reflection","declaration":{"id":77,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":78,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":79,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"instrinct","name":"boolean"}]}}]}},{"type":"reference","name":"ProtocolOptions","id":38}]}}],"type":{"type":"instrinct","name":"any"}}]}],"groups":[{"title":"Classes","kind":128,"children":[47]},{"title":"Interfaces","kind":256,"children":[29,35,2,38]},{"title":"Variables","kind":32,"children":[61]},{"title":"Functions","kind":64,"children":[62,65,70,73]}]}

@@ -0,1 +1,6 @@

<a name="1.0.0-rc.1.0.1"></a>
# [1.0.0-rc.1.0.1](https://github.com/aurelia/metadata/compare/1.0.0-rc.1.0.0...v1.0.0-rc.1.0.1) (2016-07-12)
<a name="1.0.0-rc.1.0.0"></a>

@@ -2,0 +7,0 @@ # [1.0.0-rc.1.0.0](https://github.com/aurelia/metadata/compare/1.0.0-beta.2.0.1...v1.0.0-rc.1.0.0) (2016-06-22)

{
"name": "aurelia-metadata",
"version": "1.0.0-rc.1.0.0",
"version": "1.0.0-rc.1.0.1",
"description": "Utilities for reading and writing the metadata of JavaScript functions.",

@@ -5,0 +5,0 @@ "keywords": [

/**
* Helpers for working with metadata on functions.
*
* Note for the Typescript to ES5 transpiler: Due to the non-standard compliant implementation of 'extends', these methods, when applied to derived classes, will operate on the parent class and not on the child class. This can be circumvented by either transpiling to ES2015 (ES6) or by making the targetKey parameter class-specific eg. by using target.name for the targetKey parameter.
*/

@@ -14,2 +16,6 @@ interface MetadataType {

/**
* The metadata key representing object property type information.
*/
propertyType: string;
/**
* The metadata key representing property information.

@@ -55,2 +61,3 @@ */

paramTypes: 'design:paramtypes',
propertyType: 'design:type',
properties: 'design:properties',

@@ -57,0 +64,0 @@ get(metadataKey: string, target: Function, targetKey?: string): Object {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc