Initial commit
This commit is contained in:
commit
78f8d225ee
21173 changed files with 2907774 additions and 0 deletions
42
node_modules/next/dist/build/static-paths/utils.js
generated
vendored
Normal file
42
node_modules/next/dist/build/static-paths/utils.js
generated
vendored
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
/**
|
||||
* Encodes a parameter value using the provided encoder.
|
||||
*
|
||||
* @param value - The value to encode.
|
||||
* @param encoder - The encoder to use.
|
||||
* @returns The encoded value.
|
||||
*/ "use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
0 && (module.exports = {
|
||||
encodeParam: null,
|
||||
normalizePathname: null
|
||||
});
|
||||
function _export(target, all) {
|
||||
for(var name in all)Object.defineProperty(target, name, {
|
||||
enumerable: true,
|
||||
get: all[name]
|
||||
});
|
||||
}
|
||||
_export(exports, {
|
||||
encodeParam: function() {
|
||||
return encodeParam;
|
||||
},
|
||||
normalizePathname: function() {
|
||||
return normalizePathname;
|
||||
}
|
||||
});
|
||||
function encodeParam(value, encoder) {
|
||||
let replaceValue;
|
||||
if (Array.isArray(value)) {
|
||||
replaceValue = value.map(encoder).join('/');
|
||||
} else {
|
||||
replaceValue = encoder(value);
|
||||
}
|
||||
return replaceValue;
|
||||
}
|
||||
function normalizePathname(pathname) {
|
||||
return pathname.replace(/\\/g, '/').replace(/(?!^)\/$/, '');
|
||||
}
|
||||
|
||||
//# sourceMappingURL=utils.js.map
|
||||
Loading…
Add table
Add a link
Reference in a new issue