unicode-sequence_name 1.14.0 → 1.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +11 -11
- data/README.md +6 -1
- data/data/sequence_name.marshal.gz +0 -0
- data/lib/unicode/sequence_name/constants.rb +1 -1
- data/lib/unicode/sequence_name.rb +1 -1
- data/spec/unicode_sequence_name_spec.rb +4 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4503c1bf10b43d732a5ee88c9a9059837f2190910f10a0c33fdfda6dd516b68f
|
4
|
+
data.tar.gz: 6d821ef47679dc9be1aef97a9a489051127b54f160e2fd7609a9cded3ee5decf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5e8ff63ca2e1e97a604fdf4bc4f8067afb8eba9d7e163a6ddd0eb6e13b6b565a19cc67b2f43b70566d3e5903dc429a6b8fbfb2379a938d201bd1482dccb41c9
|
7
|
+
data.tar.gz: b8728edb403073493e7d135016981ffdd2d046f1369a696fb23e0e4ec36075035aee38a19f4e03545b8d9174490e7e45235283ab4491af5fe654e8c035c4fb67
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,24 +1,24 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
unicode-sequence_name (1.14.
|
4
|
+
unicode-sequence_name (1.14.1)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
|
-
io-console (0.
|
10
|
-
irb (1.
|
11
|
-
rdoc
|
12
|
-
reline (>= 0.
|
13
|
-
minitest (5.
|
14
|
-
psych (5.1.
|
9
|
+
io-console (0.7.2)
|
10
|
+
irb (1.14.1)
|
11
|
+
rdoc (>= 4.0.0)
|
12
|
+
reline (>= 0.4.2)
|
13
|
+
minitest (5.25.1)
|
14
|
+
psych (5.1.2)
|
15
15
|
stringio
|
16
|
-
rake (13.
|
17
|
-
rdoc (6.
|
16
|
+
rake (13.2.1)
|
17
|
+
rdoc (6.7.0)
|
18
18
|
psych (>= 4.0.0)
|
19
|
-
reline (0.
|
19
|
+
reline (0.5.10)
|
20
20
|
io-console (~> 0.5)
|
21
|
-
stringio (3.
|
21
|
+
stringio (3.1.1)
|
22
22
|
|
23
23
|
PLATFORMS
|
24
24
|
ruby
|
data/README.md
CHANGED
@@ -32,12 +32,17 @@ Unicode::SequenceName.of "🙂↔️" # => "HEAD SHAKING HORIZONTALLY"
|
|
32
32
|
Unicode::SequenceName.of "‘︁" # => "LEFT SINGLE QUOTATION MARK (right-justified fullwidth form)"
|
33
33
|
```
|
34
34
|
|
35
|
-
Names for singular codepoints are not included, you can use [unicode-name](https://github.com/janlelis/unicode-name) for that purpose.
|
35
|
+
Names for singular codepoints are not included, you can use [unicode-name](https://github.com/janlelis/unicode-name) for that purpose. This is how you could use both libraries together to get the most relevant name of a character:
|
36
|
+
|
37
|
+
```ruby
|
38
|
+
name = Unicode::Name.sequence_name(char) || Unicode::Name.readable(char)
|
39
|
+
```
|
36
40
|
|
37
41
|
## Also See
|
38
42
|
|
39
43
|
- [uniscribe](https://github.com/janlelis/uniscribe) - cli utility that makes use of unicode_sequence-name
|
40
44
|
- [unicode-x](https://github.com/janlelis/unicode-x) - more Unicode related micro libraries
|
45
|
+
- [unicode-name.js](https://github.com/janlelis/unicode-name.js) - JavaScript implementation of name and sequence_name
|
41
46
|
|
42
47
|
## MIT License
|
43
48
|
|
Binary file
|
@@ -5,7 +5,7 @@ module Unicode
|
|
5
5
|
def self.sequence_name(string)
|
6
6
|
codepoints = get_codepoint_values(string)
|
7
7
|
require_relative "sequence_name/index" unless defined? ::Unicode::SequenceName::INDEX
|
8
|
-
if res = INDEX[codepoints]
|
8
|
+
if res = INDEX[:SEQUENCES][codepoints]
|
9
9
|
res
|
10
10
|
else
|
11
11
|
nil
|
@@ -23,6 +23,10 @@ describe Unicode::SequenceName do
|
|
23
23
|
assert_nil Unicode::SequenceName.of("\u{10c50}")
|
24
24
|
assert_nil Unicode::SequenceName.of("bla")
|
25
25
|
end
|
26
|
+
|
27
|
+
it "will return nil for single codepoints" do
|
28
|
+
assert_nil Unicode::SequenceName.of("⏳")
|
29
|
+
end
|
26
30
|
end
|
27
31
|
end
|
28
32
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unicode-sequence_name
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.14.
|
4
|
+
version: 1.14.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Lelis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-10-04 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: "[Unicode 16.0.0][Emoji 16.0] Returns the name of a Unicode code point
|
14
14
|
sequence, if one exists"
|
@@ -53,7 +53,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
requirements: []
|
56
|
-
rubygems_version: 3.5.
|
56
|
+
rubygems_version: 3.5.20
|
57
57
|
signing_key:
|
58
58
|
specification_version: 4
|
59
59
|
summary: Returns the name of a Unicode codepoint sequence, if one exists
|