build/lib/ipsoObject.js
function serializeWith(kernel, options) {
    const transform = buildPropertyTransform(kernel, options);
    return (target, property) => {
        // get the class constructor
        const constr = target.constructor;
        // retrieve the current metadata
        const metadata = Reflect.getMetadata(METADATA_serializeWith, constr) || {};
        metadata[property] = transform;
        // store back to the object
        Reflect.defineMetadata(METADATA_serializeWith, metadata, constr);
    };
}
function serializeWith(kernel, options) {
    const transform = buildPropertyTransform(kernel, options);
    return (target, property) => {
        // get the class constructor
        const constr = target.constructor;
        // retrieve the current metadata
        const metadata = Reflect.getMetadata(METADATA_serializeWith, constr) || {};
        metadata[property] = transform;
        // store back to the object
        Reflect.defineMetadata(METADATA_serializeWith, metadata, constr);
    };
}
function serializeWith ( kernel , options ) { const transform = buildPropertyTransform ( kernel , options ) ; return ( target , property ) => { // get the class constructor const constr = target . constructor ; // retrieve the current metadata const metadata = Reflect . getMetadata ( METADATA_serializeWith , constr ) || { } ; metadata [ property ] = transform ; // store back to the object Reflect . defineMetadata ( METADATA_serializeWith , metadata , constr ) ; } ; }
Defines the required transformations to serialize a property to a CoAP object
@param kernel The transformation to apply during serialization
@param options Some options regarding the behavior of the property transform
Defines the required transformations to serialize a property to a CoAP object