增加中文转拼音- mac

This commit is contained in:
onvia
2023-07-27 15:04:13 +08:00
parent dd0373c362
commit 1840eab0d3
287 changed files with 61358 additions and 56240 deletions

View File

@@ -6,7 +6,7 @@ const normalizeCache = Object.create(null)
const { hasOwnProperty } = Object.prototype
module.exports = s => {
if (!hasOwnProperty.call(normalizeCache, s)) {
normalizeCache[s] = s.normalize('NFD')
normalizeCache[s] = s.normalize('NFKD')
}
return normalizeCache[s]
}

View File

@@ -22,7 +22,7 @@ class PackJob {
}
}
const { Minipass } = require('minipass')
const MiniPass = require('minipass')
const zlib = require('minizlib')
const ReadEntry = require('./read-entry.js')
const WriteEntry = require('./write-entry.js')
@@ -56,7 +56,7 @@ const path = require('path')
const warner = require('./warn-mixin.js')
const normPath = require('./normalize-windows-path.js')
const Pack = warner(class Pack extends Minipass {
const Pack = warner(class Pack extends MiniPass {
constructor (opt) {
super(opt)
opt = opt || Object.create(null)

View File

@@ -123,7 +123,7 @@ module.exports = () => {
// effectively removing all parallelization on windows.
paths = isWindows ? ['win32 parallelization disabled'] : paths.map(p => {
// don't need normPath, because we skip this entirely for windows
return stripSlashes(join(normalize(p))).toLowerCase()
return normalize(stripSlashes(join(p))).toLowerCase()
})
const dirs = new Set(

View File

@@ -1,9 +1,9 @@
'use strict'
const { Minipass } = require('minipass')
const MiniPass = require('minipass')
const normPath = require('./normalize-windows-path.js')
const SLURP = Symbol('slurp')
module.exports = class ReadEntry extends Minipass {
module.exports = class ReadEntry extends MiniPass {
constructor (header, ex, gex) {
super()
// read entries always start life paused. this is to avoid the

View File

@@ -105,7 +105,7 @@ const uint32 = (a, b, c) =>
// Note that on windows, we always drop the entire cache whenever a
// symbolic link is encountered, because 8.3 filenames are impossible
// to reason about, and collisions are hazards rather than just failures.
const cacheKeyNormalize = path => stripSlash(normPath(normalize(path)))
const cacheKeyNormalize = path => normalize(stripSlash(normPath(path)))
.toLowerCase()
const pruneCache = (cache, abs) => {

View File

@@ -1,5 +1,5 @@
'use strict'
const { Minipass } = require('minipass')
const MiniPass = require('minipass')
const Pax = require('./pax.js')
const Header = require('./header.js')
const fs = require('fs')
@@ -41,7 +41,7 @@ const stripAbsolutePath = require('./strip-absolute-path.js')
const modeFix = require('./mode-fix.js')
const WriteEntry = warner(class WriteEntry extends Minipass {
const WriteEntry = warner(class WriteEntry extends MiniPass {
constructor (p, opt) {
opt = opt || {}
super(opt)
@@ -417,7 +417,7 @@ class WriteEntrySync extends WriteEntry {
}
}
const WriteEntryTar = warner(class WriteEntryTar extends Minipass {
const WriteEntryTar = warner(class WriteEntryTar extends MiniPass {
constructor (readEntry, opt) {
opt = opt || {}
super(opt)