-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Require Node.js 12.20 and move to ESM
- Loading branch information
1 parent
579ff4f
commit 62a47ef
Showing
9 changed files
with
51 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,15 @@ | ||
import {expectType} from 'tsd'; | ||
import functionArguments = require('.'); | ||
import functionArguments from './index.js'; | ||
|
||
expectType<string[]>( | ||
functionArguments(function(foo: string, bar: number) { | ||
return true; | ||
}) | ||
functionArguments((_foo: string, _bar: number) => true), | ||
); | ||
expectType<string[]>(functionArguments((foo: string, bar: number) => true)); | ||
expectType<string[]>(functionArguments((_foo: string, _bar: number) => true)); | ||
expectType<string[]>( | ||
functionArguments(function * (foo: string, bar: number) { | ||
functionArguments(function * (_foo: string, _bar: number) { // eslint-disable-line require-yield | ||
return true; | ||
}) | ||
}), | ||
); | ||
expectType<string[]>( | ||
functionArguments(async function(foo: string, bar: number) { | ||
return true; | ||
}) | ||
functionArguments(async (_foo: string, _bar: number) => true), | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
MIT License | ||
|
||
Copyright (c) Sindre Sorhus <[email protected]> (sindresorhus.com) | ||
Copyright (c) Sindre Sorhus <[email protected]> (https://sindresorhus.com) | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,13 +4,16 @@ | |
"description": "Get the arguments of a function, arrow function, generator function, async function", | ||
"license": "MIT", | ||
"repository": "sindresorhus/fn-args", | ||
"funding": "https://github.com/sponsors/sindresorhus", | ||
"author": { | ||
"name": "Sindre Sorhus", | ||
"email": "[email protected]", | ||
"url": "sindresorhus.com" | ||
"url": "https://sindresorhus.com" | ||
}, | ||
"type": "module", | ||
"exports": "./index.js", | ||
"engines": { | ||
"node": ">=8" | ||
"node": "^12.20.0 || ^14.13.1 || >=16.0.0" | ||
}, | ||
"scripts": { | ||
"test": "xo && ava test.js && tsd" | ||
|
@@ -30,22 +33,15 @@ | |
"arrow" | ||
], | ||
"devDependencies": { | ||
"ava": "^1.4.1", | ||
"esm": "^3.2.22", | ||
"semver": "^6.0.0", | ||
"tsd": "^0.7.2", | ||
"xo": "^0.24.0" | ||
"ava": "^3.15.0", | ||
"esm": "^3.2.25", | ||
"semver": "^7.3.5", | ||
"tsd": "^0.17.0", | ||
"xo": "^0.44.0" | ||
}, | ||
"xo": { | ||
"ignores": [ | ||
"test*.js" | ||
] | ||
}, | ||
"ava": { | ||
"babel": false, | ||
"compileEnhancements": false, | ||
"require": [ | ||
"esm" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters