easy-property-retriever
v0.0.2
Published
A little tool used to get object properties, taken from MDN.
Downloads
3
Maintainers
Readme
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
Run the unit tests
yarn test
License
The code in this project is licensed under MIT license.