/*
 * aaaa.js
 * Created by 还有醋v on 2022/5/25.
 * Copyright © 2022 haiyoucuv. All rights reserved.
 */

const polyfillLibrary = require('polyfill-library');
const fs = require("fs");

polyfillLibrary.getPolyfillString({
	uaString: 'Mozilla/5.0 (Linux; Android 4.1.0;) Chrome/29.0.3202.84 Mobile',
	minify: true,
	features: {
		'es5': {  },
		'Number.isNaN':  {  },
		'Number.isFinite':  {  },
		'Number.isInteger':  {  },
		'Number.parseInt':  {  },
		'Number.parseFloat':  {  },
		'Array.from':  {  },
		'Array.isArray':  {  },
		'Array.prototype.map':  {  },
		'Array.prototype.sort':  {  },
		'Array.prototype.reduce':  {  },
		'Array.prototype.indexOf':  {  },
		'Array.prototype.entries':  {  },
		'Array.prototype.filter':  {  },
		'Array.prototype.forEach':  {  },
		'Object.keys':  {  },
		'Object.values':  {  },
		'Object.assign':  {  },
		'Object.entries':  {  },
		'Promise':  {  },
		'Promise.prototype.finally':  {  },
		'Set':  {  },
		'String.prototype.repeat':  {  },
		'String.prototype.matchAll':  {  },
		'String.prototype.replaceAll':  {  },
		'String.prototype.trim':  {  },
		'String.prototype.trimEnd':  {  },
		'String.prototype.trimStart':  {  },
		'Symbol':  {  },
	}
}).then(function(bundleString) {
	fs.writeFileSync("polyfill.js", bundleString);
});
