0.0.2 • Published 3 years ago

easy-property-retriever v0.0.2

Weekly downloads
93
License
MIT
Repository
github
Last release
3 years ago

Easy Property Retriever

easy-property-retriever is a little tool used to get object properties. this lib is taken from MDN.

Quick start

Install

Install with NPM or Yarn

# npm
npm install --save easy-property-retriever
# yarn
yarn add --save easy-property-retriever

Or link to the source code directly

<script src="dist/easy-property-retriever.min.js"></script>

Name EasyPropertyRetriever is ready to use and no need to import.

Or CDN

<script src="https://unpkg.com/easy-property-retriever/dist/easy-property-retriever.min.js"></script>

Name EasyPropertyRetriever is ready to use and no need to import.

How to use

import EasyPropertyRetriever from 'easy-property-retriever';

function Person() {
  this.propA = 1;
  this.propB = 2;
}

const props = EasyPropertyRetriever.getOwnEnumerables(new Person());

console.log(props);

// Output:
// > ['propA', 'propB']

Documentation

Documentation

Run the unit tests

yarn test

License

The code in this project is licensed under MIT license.