mirror of
https://github.com/gabemart/hipku.git
synced 2025-01-31 10:10:51 +00:00
Remove the useless nonWords
This commit is contained in:
parent
3f8749e7da
commit
a78eba66f2
12
dist/hipku.js
vendored
12
dist/hipku.js
vendored
@ -244,9 +244,7 @@ function writeHaiku(wordArray, ipv6) {
|
|||||||
var octet, schemaResults, schema, nonWords, haiku;
|
var octet, schemaResults, schema, nonWords, haiku;
|
||||||
|
|
||||||
octet = 'OCTET'; // String to place in schema to show word slots
|
octet = 'OCTET'; // String to place in schema to show word slots
|
||||||
schemaResults = getSchema(ipv6, octet);
|
schema = getSchema(ipv6, octet);
|
||||||
schema = schemaResults[0];
|
|
||||||
nonWords = schemaResults[1];
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Replace each instance of 'octet' in the schema with a word from
|
** Replace each instance of 'octet' in the schema with a word from
|
||||||
@ -327,13 +325,11 @@ function getSchema(ipv6, octet) {
|
|||||||
var insertSpace = true;
|
var insertSpace = true;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** If the next entry is a nonWord, don't add a space
|
** If the current entry is a nonWord, don't add a space
|
||||||
*/
|
*/
|
||||||
for (var j = 0; j < nonWords.length; j++) {
|
if (schema[i] in nonWords) {
|
||||||
if (schema[i] === nonWords[j]) {
|
|
||||||
insertSpace = false;
|
insertSpace = false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** If the previous entry is a newLine, don't add a space
|
** If the previous entry is a newLine, don't add a space
|
||||||
@ -348,7 +344,7 @@ function getSchema(ipv6, octet) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return [schema, nonWords];
|
return schema;
|
||||||
}
|
}
|
||||||
|
|
||||||
function capitalizeHaiku(haikuArray) {
|
function capitalizeHaiku(haikuArray) {
|
||||||
|
12
index.js
12
index.js
@ -244,9 +244,7 @@ function writeHaiku(wordArray, ipv6) {
|
|||||||
var octet, schemaResults, schema, nonWords, haiku;
|
var octet, schemaResults, schema, nonWords, haiku;
|
||||||
|
|
||||||
octet = 'OCTET'; // String to place in schema to show word slots
|
octet = 'OCTET'; // String to place in schema to show word slots
|
||||||
schemaResults = getSchema(ipv6, octet);
|
schema = getSchema(ipv6, octet);
|
||||||
schema = schemaResults[0];
|
|
||||||
nonWords = schemaResults[1];
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Replace each instance of 'octet' in the schema with a word from
|
** Replace each instance of 'octet' in the schema with a word from
|
||||||
@ -327,13 +325,11 @@ function getSchema(ipv6, octet) {
|
|||||||
var insertSpace = true;
|
var insertSpace = true;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** If the next entry is a nonWord, don't add a space
|
** If the current entry is a nonWord, don't add a space
|
||||||
*/
|
*/
|
||||||
for (var j = 0; j < nonWords.length; j++) {
|
if (schema[i] in nonWords) {
|
||||||
if (schema[i] === nonWords[j]) {
|
|
||||||
insertSpace = false;
|
insertSpace = false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** If the previous entry is a newLine, don't add a space
|
** If the previous entry is a newLine, don't add a space
|
||||||
@ -348,7 +344,7 @@ function getSchema(ipv6, octet) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return [schema, nonWords];
|
return schema;
|
||||||
}
|
}
|
||||||
|
|
||||||
function capitalizeHaiku(haikuArray) {
|
function capitalizeHaiku(haikuArray) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user