Skip to content

Commit

Permalink
feat: add array-flatten & number-is-nan (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
asukaminato0721 authored Aug 15, 2024
1 parent 48c3170 commit 286c9de
Show file tree
Hide file tree
Showing 11 changed files with 61 additions and 1 deletion.
2 changes: 2 additions & 0 deletions DOWNLOAD_STATS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
| `@nolyfill/shared` | [![npm](https://img.shields.io/npm/dt/@nolyfill/shared.svg?style=flat-square&logo=npm&logoColor=white&label=total%20downloads&color=333)](https://www.npmjs.com/package/@nolyfill/shared) |
| `@nolyfill/abab` | [![npm](https://img.shields.io/npm/dt/@nolyfill/abab.svg?style=flat-square&logo=npm&logoColor=white&label=total%20downloads&color=333)](https://www.npmjs.com/package/@nolyfill/abab) |
| `@nolyfill/array-buffer-byte-length` | [![npm](https://img.shields.io/npm/dt/@nolyfill/array-buffer-byte-length.svg?style=flat-square&logo=npm&logoColor=white&label=total%20downloads&color=333)](https://www.npmjs.com/package/@nolyfill/array-buffer-byte-length) |
| `@nolyfill/array-flatten` | [![npm](https://img.shields.io/npm/dt/@nolyfill/array-flatten.svg?style=flat-square&logo=npm&logoColor=white&label=total%20downloads&color=333)](https://www.npmjs.com/package/@nolyfill/array-flatten) |
| `@nolyfill/array-includes` | [![npm](https://img.shields.io/npm/dt/@nolyfill/array-includes.svg?style=flat-square&logo=npm&logoColor=white&label=total%20downloads&color=333)](https://www.npmjs.com/package/@nolyfill/array-includes) |
| `@nolyfill/array.from` | [![npm](https://img.shields.io/npm/dt/@nolyfill/array.from.svg?style=flat-square&logo=npm&logoColor=white&label=total%20downloads&color=333)](https://www.npmjs.com/package/@nolyfill/array.from) |
| `@nolyfill/array.of` | [![npm](https://img.shields.io/npm/dt/@nolyfill/array.of.svg?style=flat-square&logo=npm&logoColor=white&label=total%20downloads&color=333)](https://www.npmjs.com/package/@nolyfill/array.of) |
Expand Down Expand Up @@ -59,6 +60,7 @@
| `@nolyfill/iterator.prototype` | [![npm](https://img.shields.io/npm/dt/@nolyfill/iterator.prototype.svg?style=flat-square&logo=npm&logoColor=white&label=total%20downloads&color=333)](https://www.npmjs.com/package/@nolyfill/iterator.prototype) |
| `@nolyfill/json-stable-stringify` | [![npm](https://img.shields.io/npm/dt/@nolyfill/json-stable-stringify.svg?style=flat-square&logo=npm&logoColor=white&label=total%20downloads&color=333)](https://www.npmjs.com/package/@nolyfill/json-stable-stringify) |
| `@nolyfill/jsonify` | [![npm](https://img.shields.io/npm/dt/@nolyfill/jsonify.svg?style=flat-square&logo=npm&logoColor=white&label=total%20downloads&color=333)](https://www.npmjs.com/package/@nolyfill/jsonify) |
| `@nolyfill/number-is-nan` | [![npm](https://img.shields.io/npm/dt/@nolyfill/number-is-nan.svg?style=flat-square&logo=npm&logoColor=white&label=total%20downloads&color=333)](https://www.npmjs.com/package/@nolyfill/number-is-nan) |
| `@nolyfill/object-is` | [![npm](https://img.shields.io/npm/dt/@nolyfill/object-is.svg?style=flat-square&logo=npm&logoColor=white&label=total%20downloads&color=333)](https://www.npmjs.com/package/@nolyfill/object-is) |
| `@nolyfill/object-keys` | [![npm](https://img.shields.io/npm/dt/@nolyfill/object-keys.svg?style=flat-square&logo=npm&logoColor=white&label=total%20downloads&color=333)](https://www.npmjs.com/package/@nolyfill/object-keys) |
| `@nolyfill/object.assign` | [![npm](https://img.shields.io/npm/dt/@nolyfill/object.assign.svg?style=flat-square&logo=npm&logoColor=white&label=total%20downloads&color=333)](https://www.npmjs.com/package/@nolyfill/object.assign) |
Expand Down
4 changes: 3 additions & 1 deletion create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@ const singleFilePackagesList = [
['is-typed-array', { '@nolyfill/which-typed-array': 'workspace:*' }],
['json-stable-stringify'],
['safe-buffer'],
['safer-buffer']
['safer-buffer'],
['array-flatten'],
['number-is-nan']
] as const;

const manualPackagesList = [
Expand Down
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"overrides": {
"abab": "workspace:@nolyfill/abab@*",
"array-buffer-byte-length": "workspace:@nolyfill/array-buffer-byte-length@*",
"array-flatten": "workspace:@nolyfill/array-flatten@*",
"array-includes": "workspace:@nolyfill/array-includes@*",
"array.from": "workspace:@nolyfill/array.from@*",
"array.of": "workspace:@nolyfill/array.of@*",
Expand Down Expand Up @@ -96,6 +97,7 @@
"iterator.prototype": "workspace:@nolyfill/iterator.prototype@*",
"json-stable-stringify": "workspace:@nolyfill/json-stable-stringify@*",
"jsonify": "workspace:@nolyfill/jsonify@*",
"number-is-nan": "workspace:@nolyfill/number-is-nan@*",
"object-is": "workspace:@nolyfill/object-is@*",
"object-keys": "workspace:@nolyfill/object-keys@*",
"object.assign": "workspace:@nolyfill/object.assign@*",
Expand Down Expand Up @@ -155,6 +157,7 @@
"overrides": {
"abab": "npm:@nolyfill/abab@^1.0",
"array-buffer-byte-length": "npm:@nolyfill/array-buffer-byte-length@^1.0",
"array-flatten": "npm:@nolyfill/array-flatten@^1.0",
"array-includes": "npm:@nolyfill/array-includes@^1.0",
"array.from": "npm:@nolyfill/array.from@^1.0",
"array.of": "npm:@nolyfill/array.of@^1.0",
Expand Down Expand Up @@ -209,6 +212,7 @@
"iterator.prototype": "npm:@nolyfill/iterator.prototype@^1.0",
"json-stable-stringify": "npm:@nolyfill/json-stable-stringify@^1.0",
"jsonify": "npm:@nolyfill/jsonify@^1.0",
"number-is-nan": "npm:@nolyfill/number-is-nan@^1.0",
"object-is": "npm:@nolyfill/object-is@^1.0",
"object-keys": "npm:@nolyfill/object-keys@^1.0",
"object.assign": "npm:@nolyfill/object.assign@^1.0",
Expand Down
1 change: 1 addition & 0 deletions packages/data/single-file/src/array-flatten.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const flatten = (x: any[]) => x.flat(Infinity);
1 change: 1 addition & 0 deletions packages/data/single-file/src/number-is-nan.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default Number.isNaN;
2 changes: 2 additions & 0 deletions packages/generated/array-flatten/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions packages/generated/array-flatten/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "@nolyfill/array-flatten",
"version": "1.0.40",
"repository": {
"type": "git",
"url": "https://github.com/SukkaW/nolyfill",
"directory": "packages/generated/array-flatten"
},
"main": "./index.js",
"license": "MIT",
"files": [
"*.js"
],
"scripts": {},
"dependencies": {},
"engines": {
"node": ">=12.4.0"
}
}
2 changes: 2 additions & 0 deletions packages/generated/number-is-nan/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions packages/generated/number-is-nan/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "@nolyfill/number-is-nan",
"version": "1.0.40",
"repository": {
"type": "git",
"url": "https://github.com/SukkaW/nolyfill",
"directory": "packages/generated/number-is-nan"
},
"main": "./index.js",
"license": "MIT",
"files": [
"*.js"
],
"scripts": {},
"dependencies": {},
"engines": {
"node": ">=12.4.0"
}
}
2 changes: 2 additions & 0 deletions packages/tools/cli/src/all-packages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
export const allPackages = [
"abab",
"array-buffer-byte-length",
"array-flatten",
"array-includes",
"array.from",
"array.of",
Expand Down Expand Up @@ -58,6 +59,7 @@ export const allPackages = [
"iterator.prototype",
"json-stable-stringify",
"jsonify",
"number-is-nan",
"object-is",
"object-keys",
"object.assign",
Expand Down
6 changes: 6 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 286c9de

Please sign in to comment.