mirror of
https://github.com/swc-project/swc.git
synced 2024-12-21 12:41:54 +03:00
bbaf619f63
swc_bundler: - [x] Fix wrapped esms. (denoland/deno#9307) - [x] Make test secure.
13 lines
286 B
TypeScript
13 lines
286 B
TypeScript
// Loaded from https://deno.land/x/ramda@v0.27.2/source/internal/_dropLastWhile.js
|
|
|
|
|
|
import slice from '../slice.js';
|
|
|
|
export default function dropLastWhile(pred, xs) {
|
|
var idx = xs.length - 1;
|
|
while (idx >= 0 && pred(xs[idx])) {
|
|
idx -= 1;
|
|
}
|
|
return slice(0, idx + 1, xs);
|
|
}
|