New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@shopify/name

Package Overview
Dependencies
Maintainers
25
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shopify/name - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

build/cjs/utilities/languageFromLocale.js

4

build/cjs/constants.js

@@ -17,3 +17,3 @@ 'use strict';

const FAMILY_NAME_GIVEN_NAME_ORDERING = new Map([['ko', defaultFamilyNameGivenNameOrderingFormatter], ['ja', (givenName, familyName, full) => full ? `${familyName}${givenName}` : `${familyName}様`], ['zh-CN', defaultFamilyNameGivenNameOrderingFormatter], ['zh-TW', defaultFamilyNameGivenNameOrderingFormatter]]);
const FAMILY_NAME_GIVEN_NAME_ORDERING_INDEXED_BY_LANGUAGE = new Map([['ko', defaultFamilyNameGivenNameOrderingFormatter], ['ja', (givenName, familyName, full) => full ? `${familyName}${givenName}` : `${familyName}様`], ['zh', defaultFamilyNameGivenNameOrderingFormatter]]);

@@ -24,2 +24,2 @@ function defaultFamilyNameGivenNameOrderingFormatter(givenName, familyName, full) {

exports.FAMILY_NAME_GIVEN_NAME_ORDERING = FAMILY_NAME_GIVEN_NAME_ORDERING;
exports.FAMILY_NAME_GIVEN_NAME_ORDERING_INDEXED_BY_LANGUAGE = FAMILY_NAME_GIVEN_NAME_ORDERING_INDEXED_BY_LANGUAGE;

@@ -6,2 +6,3 @@ 'use strict';

var constants = require('./constants.js');
var languageFromLocale = require('./utilities/languageFromLocale.js');

@@ -22,3 +23,3 @@ function formatName({

const isFullName = Boolean(options && options.full);
const customNameFormatter = constants.FAMILY_NAME_GIVEN_NAME_ORDERING.get(locale);
const customNameFormatter = constants.FAMILY_NAME_GIVEN_NAME_ORDERING_INDEXED_BY_LANGUAGE.get(languageFromLocale.languageFromLocale(locale));

@@ -25,0 +26,0 @@ if (customNameFormatter) {

@@ -6,5 +6,6 @@ 'use strict';

var constants = require('./constants.js');
var languageFromLocale = require('./utilities/languageFromLocale.js');
function hasFamilyNameGivenNameOrdering(locale) {
const familyNameGivenNameOrdering = constants.FAMILY_NAME_GIVEN_NAME_ORDERING.get(locale);
const familyNameGivenNameOrdering = constants.FAMILY_NAME_GIVEN_NAME_ORDERING_INDEXED_BY_LANGUAGE.get(languageFromLocale.languageFromLocale(locale));
return Boolean(familyNameGivenNameOrdering);

@@ -11,0 +12,0 @@ }

@@ -10,5 +10,5 @@ export declare enum UnicodeCharacterSet {

}
export declare const FAMILY_NAME_GIVEN_NAME_ORDERING: Map<string, typeof defaultFamilyNameGivenNameOrderingFormatter>;
export declare const FAMILY_NAME_GIVEN_NAME_ORDERING_INDEXED_BY_LANGUAGE: Map<string, typeof defaultFamilyNameGivenNameOrderingFormatter>;
declare function defaultFamilyNameGivenNameOrderingFormatter(givenName: string, familyName: string, full: boolean): string;
export {};
//# sourceMappingURL=constants.d.ts.map
export { getGraphemes } from './getGraphemes';
export { identifyScripts } from './identifyScripts';
export { languageFromLocale } from './languageFromLocale';
//# sourceMappingURL=index.d.ts.map
{
"name": "@shopify/name",
"version": "1.0.0",
"version": "1.0.1",
"license": "MIT",

@@ -5,0 +5,0 @@ "description": "Name-related utilities",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc