Skip to content

Commit

Permalink
fix(String): Rename from Text for better consistency with other data …
Browse files Browse the repository at this point in the history
…types and languages
  • Loading branch information
nokome committed May 11, 2021
1 parent 1163327 commit a944fea
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion schema/Text.schema.yaml → schema/String.schema.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
title: Text
title: String
'@id': schema:Text
category: data
description: A value comprised of a string of characters
Expand Down
2 changes: 1 addition & 1 deletion ts/util/nodeType.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ test('nodeType', () => {
expect(nodeType(false)).toBe('Boolean')
expect(nodeType(42)).toBe('Number')
expect(nodeType(3.14)).toBe('Number')
expect(nodeType('str')).toBe('Text')
expect(nodeType('str')).toBe('String')
expect(nodeType([])).toBe('Array')
expect(nodeType({})).toBe('Object')
expect(nodeType({ type: 'Person' })).toBe('Person')
Expand Down
2 changes: 1 addition & 1 deletion ts/util/nodeType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const nodeType = (node: Node): keyof Types => {
if (node === null) return 'Null'
if (typeof node === 'boolean') return 'Boolean'
if (typeof node === 'number') return 'Number'
if (typeof node === 'string') return 'Text'
if (typeof node === 'string') return 'String'
if (Array.isArray(node)) return 'Array'
if (isEntity(node)) return node.type
return 'Object'
Expand Down

0 comments on commit a944fea

Please sign in to comment.