mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-09 16:16:41 +08:00
fix(config): add object.entries polyfil
This commit is contained in:
@ -41,6 +41,15 @@ export function pointerCoord(ev: any): {x: number, y: number} {
|
||||
}
|
||||
export type Side = 'start' | 'end';
|
||||
|
||||
export function entries(obj: {[s: string]: T}): [string, T][] {
|
||||
const ownProps = Object.keys( obj );
|
||||
let i = ownProps.length;
|
||||
const resArray = new Array(i);
|
||||
while (i--)
|
||||
resArray[i] = [ownProps[i], obj[ownProps[i]]];
|
||||
return resArray;
|
||||
}
|
||||
|
||||
/**
|
||||
* @hidden
|
||||
* Given a side, return if it should be on the right
|
||||
|
||||
Reference in New Issue
Block a user