mirror of
https://gitee.com/onvia/ccc-tnt-psd2ui
synced 2025-12-08 22:08:46 +00:00
增加中文转拼音- mac
This commit is contained in:
@@ -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]
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user