Skip to content

Commit

Permalink
Symbol類をstringに変更 ref: cpprefjp/crsearch#27
Browse files Browse the repository at this point in the history
  • Loading branch information
saki7 committed Nov 12, 2017
1 parent 5ae90d2 commit 549af7a
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion js/kunai/meta/meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ class Meta {
}

setDOM(key, parent_key, path) {
this.log.info(`fetching '${Symbol.keyFor(key)}'... [parent: ${parent_key ? `'${Symbol.keyFor(parent_key)}'` : '(none)'}]`)
this.log.info(`fetching '${key}'... [parent: ${parent_key ? `'${parent_key}'` : '(none)'}]`)
const e = parent_key ? this.dom.get(parent_key).find(path) : $(path)

if (!e) {
Expand Down
8 changes: 4 additions & 4 deletions js/kunai/meta/page-key.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const PageKey = {
main: Symbol.for('main'),
article: Symbol.for('article'),
articleBody: Symbol.for('articleBody'),
codes: Symbol.for('codes'),
main: 'main',
article: 'article',
articleBody: 'articleBody',
codes: 'codes',
}

export {PageKey}
Expand Down
4 changes: 2 additions & 2 deletions js/kunai/net/content-type.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class ContentType {
static UNKNOWN = Symbol('unknown')
static MARKDOWN = Symbol('markdown')
static UNKNOWN = 'unknown'
static MARKDOWN = 'markdown'

static parse(url) {
const ext = url.pathname.match(/(?:\.[^.]+)+$/)
Expand Down
2 changes: 1 addition & 1 deletion js/kunai/ui/treeview.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ class DOM {
}

async makeOther(o) {
let li = $('<li>', {class: `other ${Symbol.keyFor(o.id.type)}`})
let li = $('<li>', {class: `other ${o.id.type}`})

if (IndexID.isClassy(o.id.type)) {
li.addClass('classy')
Expand Down
6 changes: 3 additions & 3 deletions js/kunai/wand.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ class APIError extends NetworkError {
}

const Method = {
get: Symbol.for('GET'),
post: Symbol.for('POST'),
get: 'GET',
post: 'POST',
}


Expand All @@ -32,7 +32,7 @@ class API {
}

static request(id, method, url, opts, data, onSuccess, onFailure) {
const reqid = JSON.stringify({method: Symbol.keyFor(method), url: String(url), id: id})
const reqid = JSON.stringify({method: method, url: String(url), id: id})
// console.time(reqid)
// const stopTimer = () => {
// console.timeEnd(reqid)
Expand Down
6 changes: 3 additions & 3 deletions js/kunai/yata.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import {default as AN} from 'anser'


const ToolID = {
play: Symbol.for('play'),
compile: Symbol.for('compile'),
theme: Symbol.for('theme'),
play: 'play',
compile: 'compile',
theme: 'theme',
}

class RefreshTimerInfo {
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"anser": "^1.4.4",
"babel-runtime": "^6.26.0",
"codemirror": "^5.31.0",
"crsearch": "^2.6.5",
"crsearch": "^2.7.0",
"font-awesome": "^4.7.0",
"jquery": "^3.2.1",
"marked": "^0.3.6",
Expand Down

0 comments on commit 549af7a

Please sign in to comment.