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 2.7KB

4 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. # assign-symbols [![NPM version](https://badge.fury.io/js/assign-symbols.svg)](http://badge.fury.io/js/assign-symbols)
  2. > Assign the enumerable es6 Symbol properties from an object (or objects) to the first object passed on the arguments. Can be used as a supplement to other extend, assign or merge methods as a polyfill for the Symbols part of the es6 Object.assign method.
  3. From the [Mozilla Developer docs for Symbol](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol):
  4. > A symbol is a unique and immutable data type and may be used as an identifier for object properties. The symbol object is an implicit object wrapper for the symbol primitive data type.
  5. ## Install
  6. Install with [npm](https://www.npmjs.com/)
  7. ```sh
  8. $ npm i assign-symbols --save
  9. ```
  10. ## Usage
  11. ```js
  12. var assignSymbols = require('assign-symbols');
  13. var obj = {};
  14. var one = {};
  15. var symbolOne = Symbol('aaa');
  16. one[symbolOne] = 'bbb';
  17. var two = {};
  18. var symbolTwo = Symbol('ccc');
  19. two[symbolTwo] = 'ddd';
  20. assignSymbols(obj, one, two);
  21. console.log(obj[symbolOne]);
  22. //=> 'bbb'
  23. console.log(obj[symbolTwo]);
  24. //=> 'ddd'
  25. ```
  26. ## Similar projects
  27. * [assign-deep](https://www.npmjs.com/package/assign-deep): Deeply assign the enumerable properties of source objects to a destination object. | [homepage](https://github.com/jonschlinkert/assign-deep)
  28. * [clone-deep](https://www.npmjs.com/package/clone-deep): Recursively (deep) clone JavaScript native types, like Object, Array, RegExp, Date as well as primitives. | [homepage](https://github.com/jonschlinkert/clone-deep)
  29. * [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)
  30. * [merge-deep](https://www.npmjs.com/package/merge-deep): Recursively merge values in a javascript object. | [homepage](https://github.com/jonschlinkert/merge-deep)
  31. * [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)
  32. ## Running tests
  33. Install dev dependencies:
  34. ```sh
  35. $ npm i -d && npm test
  36. ```
  37. ## Contributing
  38. Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/assign-symbols/issues/new).
  39. ## Author
  40. **Jon Schlinkert**
  41. + [github/jonschlinkert](https://github.com/jonschlinkert)
  42. + [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
  43. ## License
  44. Copyright © 2015 Jon Schlinkert
  45. Released under the MIT license.
  46. ***
  47. _This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on November 06, 2015._