@kingjs/define-extension
v1.0.1
Published
Defines a property on a target with a symbol name derived from `package` and `version`.
Downloads
23
Readme
@kingjs/define-extension
Defines a property on a target with a symbol name derived from package
and version
.
API
defineExtension(target, package, version, descriptor)
Parameters
target
: The target on which to declare the property.package
: The name of the package containing the extension.version
: The version of the package containing the extension.descriptor
: The descriptor describing the property.
Returns
The symbol name of the property.
Remarks
If descriptor
is a function, then it will be wrapped in an object with name value
.
Install
With npm installed, run
$ npm install @kingjs/define-extension
Source
https://repository.kingjs.net/define-extension
License
MIT