489 B
489 B
chroma_trail.js — getSpec() (satır 182)
function getSpec(st) {
var id = st.has(K_BLOCK) ? trim(st.getString(K_BLOCK)) : "";
var meta = st.has(K_META) ? Math.floor(st.getNumber(K_META)) : DEFAULT_META;
if (id.length === 0) {
id = DEFAULT_BLOCK;
meta = DEFAULT_META;
}
if (!(meta >= 0 && meta <= 15)) meta = 0;
return { id: id, meta: meta };
}