Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function pathToKeySeq(path) {
// Remove trailing '/' etc.
path = Path.join(path, '.');
if (path === '.') {
return Immutable.Seq([]);
} else {
return Immutable.Seq(path.split('/'));
}
}
_handleWhoReply(data) {
// TODO: merge instead of reset so we don't lose lastSent
this.state.who = Immutable.OrderedMap(
Immutable.Seq(data.listing)
.map(user => {
user.present = true
user.hue = hueHash.hue(user.name)
return [user.session_id, Immutable.Map(user)]
})
)
},
*findFolders() {
return Seq.of(
new Folder({
id: 'App',
title: 'Chrome Apps',
items: Seq(yield this.chrome.management.getAll())
.filter(management => /\w+_app/.test(management.type))
.map(app => new ChromeApp({
id: app.id,
title: app.name,
icons: app.icons,
}))
})
);
}
case 'number':
return ;
case 'string':
default:
return
}
};
return (
<div>
{ Seq(state).entrySeq().map(([propertyName, {currentValue, inputElement, configs}]) =>
renderInputElement(inputElement, propertyName, currentValue, configs)) }
<div style="{STYLE_WRAPPER_BUTTONS}">
<button style="{STYLE_BUTTON_UNSELECT}"> editingActions.unselectAll()}>Unselect</button>
<button style="{STYLE_BUTTON_REMOVE}"> editingActions.remove()}>Remove</button>
<button style="{STYLE_BUTTON_RESET}"> this.reset()}>Reset</button>
<button style="{STYLE_BUTTON_SAVE}"> this.save()}>Save</button>
</div>
</div>
)
}
{isOAS3 && response.get("content") ? (
<section>
<div>
<small>
Media type
</small>
{controlsAcceptHeader ? (
<small>
Controls <code>Accept</code> header.
</small>
) : null}
</div>
{examplesForMediaType ? (
<div>
<small>
Examples
</small>
</div></section>
export const slowifyAll = (min, max) => service =>
Seq(service)
.map(slowify(min, max))
.toJS();
}
const BookmarkRecord = Record({
id: null,
title: null,
link: null,
canEdit: false,
});
export class Bookmark extends BookmarkRecord {
}
const BookmarkFolderRecord = Record({
id: null,
title: null,
bookmarks: Seq(),
});
export class BookmarkFolder extends BookmarkFolderRecord {
}
const BookmarkTreeRecord = Record({
children: [],
canEdit: false,
});
export class BookmarkTree extends BookmarkTreeRecord {
flatten() {
const canEdit = this.canEdit;
function traverse(parent) {
const children = Seq(parent.children);
const bookmarkFolders = children.filter(child => child.url === undefined).flatMap(traverse);
sortBy.implement(Array, (getSortValue, arr) => {
return Seq(arr)
.sortBy(getSortValue)
.toArray();
});
createSeq (value) {
return immutable.Seq(value)
}
export function routeSetState (routeDef: RouteDefNode, routeState: RouteStateNode, path: Path, partialState: {}): RouteStateNode {
const pathSeq = I.Seq(path)
if (!pathSeq.size) {
return routeState.update('state', state => state.merge(partialState))
}
return routeState.updateChild(pathSeq.first(), childState => {
if (!childState) {
throw new InvalidRouteError(`Missing state child: ${pathSeq.first()}`)
}
return routeSetState(routeDef, childState, pathSeq.skip(1), partialState)
})
}