Skip to content

Commit

Permalink
chore: run codegen
Browse files Browse the repository at this point in the history
  • Loading branch information
SukkaW committed Oct 11, 2023
1 parent 1f163ea commit 3e3aa90
Show file tree
Hide file tree
Showing 300 changed files with 1,948 additions and 1,165 deletions.
34 changes: 27 additions & 7 deletions packages/generated/array-buffer-byte-length/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,28 @@
'use strict';
const { uncurryThis } = require('@nolyfill/shared');
const isArrayBuffer = require('@nolyfill/is-array-buffer');
const bL = uncurryThis(Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, 'byteLength').get);
module.exports = (ab) => {
if (!isArrayBuffer(ab)) return NaN;
return bL(ab);
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: function() {
return _default;
}
});
var _shared = require("@nolyfill/shared");
var _isarraybuffer = /*#__PURE__*/ _interop_require_default(require("@nolyfill/is-array-buffer"));
function _interop_require_default(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
var bL = (0, _shared.uncurryThis)(Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, "byteLength").get);
var is = function(ab) {
if (!(0, _isarraybuffer.default)(ab)) return NaN;
return bL(ab);
};
var _default = is;

if ((typeof exports.default === 'object' && exports.default !== null) || typeof exports.default === 'function') {
Object.assign(exports.default, exports);
}
module.exports = exports.default;
2 changes: 1 addition & 1 deletion packages/generated/array-buffer-byte-length/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nolyfill/array-buffer-byte-length",
"version": "1.0.21",
"version": "1.0.22",
"repository": {
"type": "git",
"url": "https://github.com/SukkaW/nolyfill",
Expand Down
15 changes: 15 additions & 0 deletions packages/generated/array-includes/entry.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: function() {
return _default;
}
});
var _shared = require("@nolyfill/shared");
var _default = (0, _shared.defineEsShim)(Array.prototype.includes);

Object.assign(exports.default, exports);
module.exports = exports.default;
2 changes: 1 addition & 1 deletion packages/generated/array-includes/implementation.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
'use strict';
module.exports = Array.prototype.includes;
module.exports = require('./entry.js').implementation;
6 changes: 1 addition & 5 deletions packages/generated/array-includes/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
'use strict';
const { uncurryThis, makeEsShim } = require('@nolyfill/shared');
const impl = Array.prototype.includes;
const bound = uncurryThis(impl);
makeEsShim(bound, impl);
module.exports = bound;
module.exports = require('./entry.js').index();
2 changes: 1 addition & 1 deletion packages/generated/array-includes/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nolyfill/array-includes",
"version": "1.0.21",
"version": "1.0.22",
"repository": {
"type": "git",
"url": "https://github.com/SukkaW/nolyfill",
Expand Down
2 changes: 1 addition & 1 deletion packages/generated/array-includes/polyfill.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
'use strict';
module.exports = () => Array.prototype.includes;
module.exports = require('./entry.js').polyfill;
2 changes: 1 addition & 1 deletion packages/generated/array-includes/shim.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
'use strict';
module.exports = () => Array.prototype.includes;
module.exports = require('./entry.js').shim;
15 changes: 15 additions & 0 deletions packages/generated/array.from/entry.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: function() {
return _default;
}
});
var _shared = require("@nolyfill/shared");
var _default = (0, _shared.defineEsShim)(Array.from, true);

Object.assign(exports.default, exports);
module.exports = exports.default;
2 changes: 1 addition & 1 deletion packages/generated/array.from/implementation.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
'use strict';
module.exports = Array.from;
module.exports = require('./entry.js').implementation;
6 changes: 1 addition & 5 deletions packages/generated/array.from/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
'use strict';
const { makeEsShim } = require('@nolyfill/shared');
const impl = Array.from;
const bound = impl;
makeEsShim(bound, impl);
module.exports = bound;
module.exports = require('./entry.js').index();
2 changes: 1 addition & 1 deletion packages/generated/array.from/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nolyfill/array.from",
"version": "1.0.21",
"version": "1.0.22",
"repository": {
"type": "git",
"url": "https://github.com/SukkaW/nolyfill",
Expand Down
2 changes: 1 addition & 1 deletion packages/generated/array.from/polyfill.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
'use strict';
module.exports = () => Array.from;
module.exports = require('./entry.js').polyfill;
2 changes: 1 addition & 1 deletion packages/generated/array.from/shim.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
'use strict';
module.exports = () => Array.from;
module.exports = require('./entry.js').shim;
21 changes: 21 additions & 0 deletions packages/generated/array.prototype.at/entry.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: function() {
return _default;
}
});
var _shared = require("@nolyfill/shared");
var implementation = Array.prototype.at || function at(n) {
n = Math.trunc(n) || 0;
if (n < 0) n += this.length;
if (n < 0 || n >= this.length) return undefined;
return this[n];
};
var _default = (0, _shared.defineEsShim)(implementation);

Object.assign(exports.default, exports);
module.exports = exports.default;
7 changes: 1 addition & 6 deletions packages/generated/array.prototype.at/implementation.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
'use strict';
module.exports = Array.prototype.at || function at(n) {
n = Math.trunc(n) || 0;
if (n < 0) n += this.length;
if (n < 0 || n >= this.length) return undefined;
return this[n];
};
module.exports = require('./entry.js').implementation;
11 changes: 1 addition & 10 deletions packages/generated/array.prototype.at/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,2 @@
'use strict';
const { uncurryThis, makeEsShim } = require('@nolyfill/shared');
const impl = Array.prototype.at || function at(n) {
n = Math.trunc(n) || 0;
if (n < 0) n += this.length;
if (n < 0 || n >= this.length) return undefined;
return this[n];
};
const bound = uncurryThis(impl);
makeEsShim(bound, impl);
module.exports = bound;
module.exports = require('./entry.js').index();
2 changes: 1 addition & 1 deletion packages/generated/array.prototype.at/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nolyfill/array.prototype.at",
"version": "1.0.21",
"version": "1.0.22",
"repository": {
"type": "git",
"url": "https://github.com/SukkaW/nolyfill",
Expand Down
7 changes: 1 addition & 6 deletions packages/generated/array.prototype.at/polyfill.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
'use strict';
module.exports = () => Array.prototype.at || function at(n) {
n = Math.trunc(n) || 0;
if (n < 0) n += this.length;
if (n < 0 || n >= this.length) return undefined;
return this[n];
};
module.exports = require('./entry.js').polyfill;
7 changes: 1 addition & 6 deletions packages/generated/array.prototype.at/shim.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
'use strict';
module.exports = () => Array.prototype.at || function at(n) {
n = Math.trunc(n) || 0;
if (n < 0) n += this.length;
if (n < 0 || n >= this.length) return undefined;
return this[n];
};
module.exports = require('./entry.js').shim;
15 changes: 15 additions & 0 deletions packages/generated/array.prototype.find/entry.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: function() {
return _default;
}
});
var _shared = require("@nolyfill/shared");
var _default = (0, _shared.defineEsShim)(Array.prototype.find);

Object.assign(exports.default, exports);
module.exports = exports.default;
2 changes: 1 addition & 1 deletion packages/generated/array.prototype.find/implementation.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
'use strict';
module.exports = Array.prototype.find;
module.exports = require('./entry.js').implementation;
6 changes: 1 addition & 5 deletions packages/generated/array.prototype.find/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
'use strict';
const { uncurryThis, makeEsShim } = require('@nolyfill/shared');
const impl = Array.prototype.find;
const bound = uncurryThis(impl);
makeEsShim(bound, impl);
module.exports = bound;
module.exports = require('./entry.js').index();
2 changes: 1 addition & 1 deletion packages/generated/array.prototype.find/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nolyfill/array.prototype.find",
"version": "1.0.21",
"version": "1.0.22",
"repository": {
"type": "git",
"url": "https://github.com/SukkaW/nolyfill",
Expand Down
2 changes: 1 addition & 1 deletion packages/generated/array.prototype.find/polyfill.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
'use strict';
module.exports = () => Array.prototype.find;
module.exports = require('./entry.js').polyfill;
2 changes: 1 addition & 1 deletion packages/generated/array.prototype.find/shim.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
'use strict';
module.exports = () => Array.prototype.find;
module.exports = require('./entry.js').shim;
21 changes: 21 additions & 0 deletions packages/generated/array.prototype.findlast/entry.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: function() {
return _default;
}
});
var _shared = require("@nolyfill/shared");
var implementation = Array.prototype.findLast || function(callback, thisArg) {
for(var i = this.length - 1; i >= 0; i--){
var value = this[i];
if (callback.call(thisArg, value, i, this)) return value;
}
};
var _default = (0, _shared.defineEsShim)(implementation);

Object.assign(exports.default, exports);
module.exports = exports.default;
Original file line number Diff line number Diff line change
@@ -1,8 +1,2 @@
'use strict';
module.exports = Array.prototype.findLast || function (callback, thisArg) {
for (let i = this.length - 1; i >= 0; i--) {
const value = this[i];
if (callback.call(thisArg, value, i, this)) return value;
}
return void undefined;
};
module.exports = require('./entry.js').implementation;
12 changes: 1 addition & 11 deletions packages/generated/array.prototype.findlast/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,2 @@
'use strict';
const { uncurryThis, makeEsShim } = require('@nolyfill/shared');
const impl = Array.prototype.findLast || function (callback, thisArg) {
for (let i = this.length - 1; i >= 0; i--) {
const value = this[i];
if (callback.call(thisArg, value, i, this)) return value;
}
return void undefined;
};
const bound = uncurryThis(impl);
makeEsShim(bound, impl);
module.exports = bound;
module.exports = require('./entry.js').index();
2 changes: 1 addition & 1 deletion packages/generated/array.prototype.findlast/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nolyfill/array.prototype.findlast",
"version": "1.0.21",
"version": "1.0.22",
"repository": {
"type": "git",
"url": "https://github.com/SukkaW/nolyfill",
Expand Down
8 changes: 1 addition & 7 deletions packages/generated/array.prototype.findlast/polyfill.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,2 @@
'use strict';
module.exports = () => Array.prototype.findLast || function (callback, thisArg) {
for (let i = this.length - 1; i >= 0; i--) {
const value = this[i];
if (callback.call(thisArg, value, i, this)) return value;
}
return void undefined;
};
module.exports = require('./entry.js').polyfill;
8 changes: 1 addition & 7 deletions packages/generated/array.prototype.findlast/shim.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,2 @@
'use strict';
module.exports = () => Array.prototype.findLast || function (callback, thisArg) {
for (let i = this.length - 1; i >= 0; i--) {
const value = this[i];
if (callback.call(thisArg, value, i, this)) return value;
}
return void undefined;
};
module.exports = require('./entry.js').shim;
21 changes: 21 additions & 0 deletions packages/generated/array.prototype.findlastindex/entry.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: function() {
return _default;
}
});
var _shared = require("@nolyfill/shared");
var implementation = Array.prototype.findLastIndex || function(callback, thisArg) {
for(var i = this.length - 1; i >= 0; i--){
if (callback.call(thisArg, this[i], i, this)) return i;
}
return -1;
};
var _default = (0, _shared.defineEsShim)(implementation);

Object.assign(exports.default, exports);
module.exports = exports.default;
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
'use strict';
module.exports = Array.prototype.findLastIndex || function (callback, thisArg) {
for (let i = this.length - 1; i >= 0; i--) {
if (callback.call(thisArg, this[i], i, this)) return i;
}
return -1;
};
module.exports = require('./entry.js').implementation;
11 changes: 1 addition & 10 deletions packages/generated/array.prototype.findlastindex/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,2 @@
'use strict';
const { uncurryThis, makeEsShim } = require('@nolyfill/shared');
const impl = Array.prototype.findLastIndex || function (callback, thisArg) {
for (let i = this.length - 1; i >= 0; i--) {
if (callback.call(thisArg, this[i], i, this)) return i;
}
return -1;
};
const bound = uncurryThis(impl);
makeEsShim(bound, impl);
module.exports = bound;
module.exports = require('./entry.js').index();
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nolyfill/array.prototype.findlastindex",
"version": "1.0.21",
"version": "1.0.22",
"repository": {
"type": "git",
"url": "https://github.com/SukkaW/nolyfill",
Expand Down
7 changes: 1 addition & 6 deletions packages/generated/array.prototype.findlastindex/polyfill.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
'use strict';
module.exports = () => Array.prototype.findLastIndex || function (callback, thisArg) {
for (let i = this.length - 1; i >= 0; i--) {
if (callback.call(thisArg, this[i], i, this)) return i;
}
return -1;
};
module.exports = require('./entry.js').polyfill;
7 changes: 1 addition & 6 deletions packages/generated/array.prototype.findlastindex/shim.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
'use strict';
module.exports = () => Array.prototype.findLastIndex || function (callback, thisArg) {
for (let i = this.length - 1; i >= 0; i--) {
if (callback.call(thisArg, this[i], i, this)) return i;
}
return -1;
};
module.exports = require('./entry.js').shim;
Loading

0 comments on commit 3e3aa90

Please sign in to comment.