0.0.0 • Published 3 years ago

@yonle/object.foreach v0.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

Object.forEach

A simple Object.forEach with Front & Backend support

Example

Front-end Support

First off, Load the script

<script src="https://cdn.jsdelivr.net/npm/@yonle/object.foreach"></script>

After that, Script is Ready to use.

var thisObject = {
	foo: 'bar',
	bar: 'foo'
}

thisObject.forEach((res, pyt) => console.log(res, pyt));
// bar foo
// foo bar

Back-end Support

We need to load the module so it works perfectly by using require(....).

var thisObject = {
	foo: 'bar',
	bar: 'foo'
}

require('@yonle/object.foreach');

thisObject.forEach((res, pyt) => console.log(res, pyt));
// bar foo
// foo bar

Community