update, text, response
This commit is contained in:
45
node_modules/d/README.md
generated
vendored
45
node_modules/d/README.md
generated
vendored
@@ -1,8 +1,12 @@
|
||||
# D
|
||||
[![Build status][build-image]][build-url]
|
||||
[![Tests coverage][cov-image]][cov-url]
|
||||
[![npm version][npm-image]][npm-url]
|
||||
|
||||
# d
|
||||
|
||||
## Property descriptor factory
|
||||
|
||||
_Originally derived from [es5-ext](https://github.com/medikoo/es5-ext) package._
|
||||
_Originally derived from [d](https://github.com/medikoo/d) package._
|
||||
|
||||
Defining properties with descriptors is very verbose:
|
||||
|
||||
@@ -10,28 +14,18 @@ Defining properties with descriptors is very verbose:
|
||||
var Account = function () {};
|
||||
Object.defineProperties(Account.prototype, {
|
||||
deposit: {
|
||||
value: function () {
|
||||
/* ... */
|
||||
},
|
||||
value: function () { /* ... */ },
|
||||
configurable: true,
|
||||
enumerable: false,
|
||||
writable: true
|
||||
},
|
||||
withdraw: {
|
||||
value: function () {
|
||||
/* ... */
|
||||
},
|
||||
value: function () { /* ... */ },
|
||||
configurable: true,
|
||||
enumerable: false,
|
||||
writable: true
|
||||
},
|
||||
balance: {
|
||||
get: function () {
|
||||
/* ... */
|
||||
},
|
||||
configurable: true,
|
||||
enumerable: false
|
||||
}
|
||||
balance: { get: function () { /* ... */ }, configurable: true, enumerable: false }
|
||||
});
|
||||
```
|
||||
|
||||
@@ -42,15 +36,9 @@ var d = require("d");
|
||||
|
||||
var Account = function () {};
|
||||
Object.defineProperties(Account.prototype, {
|
||||
deposit: d(function () {
|
||||
/* ... */
|
||||
}),
|
||||
withdraw: d(function () {
|
||||
/* ... */
|
||||
}),
|
||||
balance: d.gs(function () {
|
||||
/* ... */
|
||||
})
|
||||
deposit: d(function () { /* ... */ }),
|
||||
withdraw: d(function () { /* ... */ }),
|
||||
balance: d.gs(function () { /* ... */ })
|
||||
});
|
||||
```
|
||||
|
||||
@@ -113,7 +101,7 @@ var foo = new Foo();
|
||||
foo.items.push(1, 2); // foo.items array created and defined directly on foo
|
||||
```
|
||||
|
||||
## Tests [](https://travis-ci.org/medikoo/d)
|
||||
## Tests
|
||||
|
||||
$ npm test
|
||||
|
||||
@@ -132,3 +120,10 @@ To report a security vulnerability, please use the [Tidelift security contact](h
|
||||
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
|
||||
</sub>
|
||||
</div>
|
||||
|
||||
[build-image]: https://github.com/medikoo/d/workflows/Integrate/badge.svg
|
||||
[build-url]: https://github.com/medikoo/d/actions?query=workflow%3AIntegrate
|
||||
[cov-image]: https://img.shields.io/codecov/c/github/medikoo/d.svg
|
||||
[cov-url]: https://codecov.io/gh/medikoo/d
|
||||
[npm-image]: https://img.shields.io/npm/v/d.svg
|
||||
[npm-url]: https://www.npmjs.com/package/d
|
||||
|
||||
Reference in New Issue
Block a user