Dieses Repository beinhaltet HTML- und Javascript Code zur einer NotizenWebApp auf Basis von Web Storage. Zudem sind Mocha/Chai Tests im Browser enthalten. https://meinenotizen.netlify.app/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 4.7KB

4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. # define-property [![NPM version](https://img.shields.io/npm/v/define-property.svg?style=flat)](https://www.npmjs.com/package/define-property) [![NPM monthly downloads](https://img.shields.io/npm/dm/define-property.svg?style=flat)](https://npmjs.org/package/define-property) [![NPM total downloads](https://img.shields.io/npm/dt/define-property.svg?style=flat)](https://npmjs.org/package/define-property) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/define-property.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/define-property)
  2. > Define a non-enumerable property on an object. Uses Reflect.defineProperty when available, otherwise Object.defineProperty.
  3. Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.
  4. ## Install
  5. Install with [npm](https://www.npmjs.com/):
  6. ```sh
  7. $ npm install --save define-property
  8. ```
  9. ## Release history
  10. See [the CHANGELOG](changelog.md) for updates.
  11. ## Usage
  12. **Params**
  13. * `object`: The object on which to define the property.
  14. * `key`: The name of the property to be defined or modified.
  15. * `value`: The value or descriptor of the property being defined or modified.
  16. ```js
  17. var define = require('define-property');
  18. var obj = {};
  19. define(obj, 'foo', function(val) {
  20. return val.toUpperCase();
  21. });
  22. // by default, defined properties are non-enumberable
  23. console.log(obj);
  24. //=> {}
  25. console.log(obj.foo('bar'));
  26. //=> 'BAR'
  27. ```
  28. **defining setters/getters**
  29. Pass the same properties you would if using [Object.defineProperty](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) or [Reflect.defineProperty](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/defineProperty).
  30. ```js
  31. define(obj, 'foo', {
  32. set: function() {},
  33. get: function() {}
  34. });
  35. ```
  36. ## About
  37. <details>
  38. <summary><strong>Contributing</strong></summary>
  39. Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
  40. </details>
  41. <details>
  42. <summary><strong>Running Tests</strong></summary>
  43. Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
  44. ```sh
  45. $ npm install && npm test
  46. ```
  47. </details>
  48. <details>
  49. <summary><strong>Building docs</strong></summary>
  50. _(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
  51. To generate the readme, run the following command:
  52. ```sh
  53. $ npm install -g verbose/verb#dev verb-generate-readme && verb
  54. ```
  55. </details>
  56. ### Related projects
  57. You might also be interested in these projects:
  58. * [assign-deep](https://www.npmjs.com/package/assign-deep): Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target… [more](https://github.com/jonschlinkert/assign-deep) | [homepage](https://github.com/jonschlinkert/assign-deep "Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target (first) object.")
  59. * [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow "Extend an object with the properties of additional objects. node.js/javascript util.")
  60. * [merge-deep](https://www.npmjs.com/package/merge-deep): Recursively merge values in a javascript object. | [homepage](https://github.com/jonschlinkert/merge-deep "Recursively merge values in a javascript object.")
  61. * [mixin-deep](https://www.npmjs.com/package/mixin-deep): Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone. | [homepage](https://github.com/jonschlinkert/mixin-deep "Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone.")
  62. ### Contributors
  63. | **Commits** | **Contributor** |
  64. | --- | --- |
  65. | 28 | [jonschlinkert](https://github.com/jonschlinkert) |
  66. | 1 | [doowb](https://github.com/doowb) |
  67. ### Author
  68. **Jon Schlinkert**
  69. * Connect with me on [linkedin/in/jonschlinkert](https://linkedin.com/in/jonschlinkert)
  70. * Follow me on [github/jonschlinkert](https://github.com/jonschlinkert)
  71. * Follow me on [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
  72. ### License
  73. Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert).
  74. Released under the [MIT License](LICENSE).
  75. ***
  76. _This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on January 25, 2018._