Sha256: bc9e2fb309b067655b6abbb764941ac48014366a3662db209cf0e9d0a4db54dd

Contents?: true

Size: 1.36 KB

Versions: 164

Compression:

Stored size: 1.36 KB

Contents

'use strict';
/* eslint-disable yoda */
module.exports = x => {
	if (Number.isNaN(x)) {
		return false;
	}

	// code points are derived from:
	// http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt
	if (
		x >= 0x1100 && (
			x <= 0x115f ||  // Hangul Jamo
			x === 0x2329 || // LEFT-POINTING ANGLE BRACKET
			x === 0x232a || // RIGHT-POINTING ANGLE BRACKET
			// CJK Radicals Supplement .. Enclosed CJK Letters and Months
			(0x2e80 <= x && x <= 0x3247 && x !== 0x303f) ||
			// Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
			(0x3250 <= x && x <= 0x4dbf) ||
			// CJK Unified Ideographs .. Yi Radicals
			(0x4e00 <= x && x <= 0xa4c6) ||
			// Hangul Jamo Extended-A
			(0xa960 <= x && x <= 0xa97c) ||
			// Hangul Syllables
			(0xac00 <= x && x <= 0xd7a3) ||
			// CJK Compatibility Ideographs
			(0xf900 <= x && x <= 0xfaff) ||
			// Vertical Forms
			(0xfe10 <= x && x <= 0xfe19) ||
			// CJK Compatibility Forms .. Small Form Variants
			(0xfe30 <= x && x <= 0xfe6b) ||
			// Halfwidth and Fullwidth Forms
			(0xff01 <= x && x <= 0xff60) ||
			(0xffe0 <= x && x <= 0xffe6) ||
			// Kana Supplement
			(0x1b000 <= x && x <= 0x1b001) ||
			// Enclosed Ideographic Supplement
			(0x1f200 <= x && x <= 0x1f251) ||
			// CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
			(0x20000 <= x && x <= 0x3fffd)
		)
	) {
		return true;
	}

	return false;
};

Version data entries

164 entries across 110 versions & 19 rubygems

Version Path
trusty-cms-4.1.6 node_modules/is-fullwidth-code-point/index.js
trusty-cms-4.1.5 node_modules/is-fullwidth-code-point/index.js
enju_library-0.3.8 spec/dummy/node_modules/is-fullwidth-code-point/index.js
ilog-0.4.1 node_modules/friendly-errors-webpack-plugin/node_modules/is-fullwidth-code-point/index.js
ilog-0.4.0 node_modules/friendly-errors-webpack-plugin/node_modules/is-fullwidth-code-point/index.js
ilog-0.3.3 node_modules/friendly-errors-webpack-plugin/node_modules/is-fullwidth-code-point/index.js
learn_create-0.0.22 lib/templates/javascript_lab_template/node_modules/is-fullwidth-code-point/index.js
jester-data-8.0.0 node_modules/is-fullwidth-code-point/index.js
ezii-os-5.2.1 node_modules/is-fullwidth-code-point/index.js
ezii-os-2.0.1 node_modules/is-fullwidth-code-point/index.js
ezii-os-1.1.0 node_modules/is-fullwidth-code-point/index.js
ezii-os-1.0.0 node_modules/is-fullwidth-code-point/index.js
ezii-os-0.0.0.1.0 node_modules/is-fullwidth-code-point/index.js
ezii-os-0.0.0.0.1 node_modules/is-fullwidth-code-point/index.js
govuk_publishing_components-18.0.0 node_modules/table/node_modules/is-fullwidth-code-point/index.js
govuk_publishing_components-18.0.0 node_modules/standard/node_modules/is-fullwidth-code-point/index.js
govuk_publishing_components-17.21.0 node_modules/standard/node_modules/is-fullwidth-code-point/index.js
govuk_publishing_components-17.21.0 node_modules/table/node_modules/is-fullwidth-code-point/index.js
govuk_publishing_components-17.20.0 node_modules/standard/node_modules/is-fullwidth-code-point/index.js
govuk_publishing_components-17.20.0 node_modules/table/node_modules/is-fullwidth-code-point/index.js