repo stringlengths 5 106 | file_url stringlengths 78 301 | file_path stringlengths 4 211 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 14:56:49 2026-01-05 02:23:25 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
pcottle/learnGitBranching | https://github.com/pcottle/learnGitBranching/blob/ab9f50900146ada578eeb8e0021b906282cecec4/src/js/intl/index.js | src/js/intl/index.js | var LocaleStore = require('../stores/LocaleStore');
var _ = require('underscore');
var strings = require('../intl/strings').strings;
var getDefaultLocale = LocaleStore.getDefaultLocale;
var fallbackMap = {
'zh_TW': 'zh_CN',
'es_AR': 'es_ES',
'es_MX': 'es_ES'
};
// lets change underscores template settings so ... | javascript | MIT | ab9f50900146ada578eeb8e0021b906282cecec4 | 2026-01-04T15:00:57.245895Z | false |
pcottle/learnGitBranching | https://github.com/pcottle/learnGitBranching/blob/ab9f50900146ada578eeb8e0021b906282cecec4/src/js/intl/checkStrings.js | src/js/intl/checkStrings.js | var { join } = require('path');
var { readFileSync } = require('fs');
var util = require('../util');
var { strings } = require('../intl/strings');
var easyRegex = /intl\.str\(\s*'([a-zA-Z\-]+)'/g;
var allKetSet = new Set(Object.keys(strings));
allKetSet.delete('error-untranslated'); // used in ./index.js
var goodKe... | javascript | MIT | ab9f50900146ada578eeb8e0021b906282cecec4 | 2026-01-04T15:00:57.245895Z | false |
pcottle/learnGitBranching | https://github.com/pcottle/learnGitBranching/blob/ab9f50900146ada578eeb8e0021b906282cecec4/src/js/git/index.js | src/js/git/index.js | var Backbone = require('backbone');
var Q = require('q');
var intl = require('../intl');
var AnimationFactory = require('../visuals/animation/animationFactory').AnimationFactory;
var AnimationQueue = require('../visuals/animation').AnimationQueue;
var TreeCompare = require('../graph/treeCompare');
var Graph = requir... | javascript | MIT | ab9f50900146ada578eeb8e0021b906282cecec4 | 2026-01-04T15:00:57.245895Z | true |
pcottle/learnGitBranching | https://github.com/pcottle/learnGitBranching/blob/ab9f50900146ada578eeb8e0021b906282cecec4/src/js/git/gitShim.js | src/js/git/gitShim.js | var Q = require('q');
var Main = require('../app');
var MultiView = require('../views/multiView').MultiView;
function GitShim(options) {
options = options || {};
// these variables are just functions called before / after for
// simple things (like incrementing a counter)
this.beforeCB = options.beforeCB || ... | javascript | MIT | ab9f50900146ada578eeb8e0021b906282cecec4 | 2026-01-04T15:00:57.245895Z | false |
pcottle/learnGitBranching | https://github.com/pcottle/learnGitBranching/blob/ab9f50900146ada578eeb8e0021b906282cecec4/src/js/git/commands.js | src/js/git/commands.js | var escapeString = require('../util/escapeString');
var intl = require('../intl');
var Graph = require('../graph');
var Errors = require('../util/errors');
var CommandProcessError = Errors.CommandProcessError;
var GitError = Errors.GitError;
var Warning = Errors.Warning;
var CommandResult = Errors.CommandResult;
var ... | javascript | MIT | ab9f50900146ada578eeb8e0021b906282cecec4 | 2026-01-04T15:00:57.245895Z | false |
pcottle/learnGitBranching | https://github.com/pcottle/learnGitBranching/blob/ab9f50900146ada578eeb8e0021b906282cecec4/src/js/git/headless.js | src/js/git/headless.js | var Backbone = require('backbone');
var Q = require('q');
var GitEngine = require('../git').GitEngine;
var AnimationFactory = require('../visuals/animation/animationFactory').AnimationFactory;
var GitVisuals = require('../visuals').GitVisuals;
var TreeCompare = require('../graph/treeCompare');
var EventBaton = require... | javascript | MIT | ab9f50900146ada578eeb8e0021b906282cecec4 | 2026-01-04T15:00:57.245895Z | false |
pcottle/learnGitBranching | https://github.com/pcottle/learnGitBranching/blob/ab9f50900146ada578eeb8e0021b906282cecec4/src/js/dialogs/nextLevel.js | src/js/dialogs/nextLevel.js | exports.dialog = {
'en_US': [{
type: 'ModalAlert',
options: {
markdowns: [
'## Great Job!!!',
'',
'You solved the level in *{numCommands}* command(s); ',
'our solution uses {best}.'
]
}
}],
'de_DE': [{
type: 'ModalAlert',
options: {
markdowns: ... | javascript | MIT | ab9f50900146ada578eeb8e0021b906282cecec4 | 2026-01-04T15:00:57.245895Z | false |
pcottle/learnGitBranching | https://github.com/pcottle/learnGitBranching/blob/ab9f50900146ada578eeb8e0021b906282cecec4/src/js/dialogs/sandbox.js | src/js/dialogs/sandbox.js | const { Branch } = require("../git");
exports.dialog = {
'en_US': [{
type: 'ModalAlert',
options: {
markdowns: [
'## Welcome to Learn Git Branching',
'',
'Interested in learning Git? Well you\'ve come to the right place! ',
'"Learn Git Branching" is the most visual and i... | javascript | MIT | ab9f50900146ada578eeb8e0021b906282cecec4 | 2026-01-04T15:00:57.245895Z | true |
pcottle/learnGitBranching | https://github.com/pcottle/learnGitBranching/blob/ab9f50900146ada578eeb8e0021b906282cecec4/src/js/dialogs/levelBuilder.js | src/js/dialogs/levelBuilder.js | exports.dialog = {
'en_US': [{
type: 'ModalAlert',
options: {
markdowns: [
'## Welcome to the level builder!',
'',
'Here are the main steps:',
'',
' * Set up the initial environment with git commands',
' * Define the starting tree with ```define start```... | javascript | MIT | ab9f50900146ada578eeb8e0021b906282cecec4 | 2026-01-04T15:00:57.245895Z | false |
pcottle/learnGitBranching | https://github.com/pcottle/learnGitBranching/blob/ab9f50900146ada578eeb8e0021b906282cecec4/src/js/dialogs/confirmShowSolution.js | src/js/dialogs/confirmShowSolution.js | exports.dialog = {
'en_US': [{
type: 'ModalAlert',
options: {
markdowns: [
'## Are you sure you want to see the solution?',
'',
'I believe in you! You can do it'
]
}
}],
'de_DE': [{
type: 'ModalAlert',
options: {
markdowns: [
'## Bist du sicher... | javascript | MIT | ab9f50900146ada578eeb8e0021b906282cecec4 | 2026-01-04T15:00:57.245895Z | false |
pcottle/learnGitBranching | https://github.com/pcottle/learnGitBranching/blob/ab9f50900146ada578eeb8e0021b906282cecec4/src/js/react_views/HelperBarView.jsx | src/js/react_views/HelperBarView.jsx | var React = require('react');
var PropTypes = require('prop-types');
var reactUtil = require('../util/reactUtil');
class HelperBarView extends React.Component {
render() {
var topClassName = reactUtil.joinClasses([
'helperBar',
'transitionAll',
this.props.shown ? 'show' : '',
this.props... | javascript | MIT | ab9f50900146ada578eeb8e0021b906282cecec4 | 2026-01-04T15:00:57.245895Z | false |
pcottle/learnGitBranching | https://github.com/pcottle/learnGitBranching/blob/ab9f50900146ada578eeb8e0021b906282cecec4/src/js/react_views/CommandHistoryView.jsx | src/js/react_views/CommandHistoryView.jsx | var React = require('react');
var PropTypes = require('prop-types');
var CommandView = require('../react_views/CommandView.jsx');
var Main = require('../app');
var _subscribeEvents = [
'add',
'reset',
'change',
'all'
];
class CommandHistoryView extends React.Component {
componentDidMount() {
for (var ... | javascript | MIT | ab9f50900146ada578eeb8e0021b906282cecec4 | 2026-01-04T15:00:57.245895Z | false |
pcottle/learnGitBranching | https://github.com/pcottle/learnGitBranching/blob/ab9f50900146ada578eeb8e0021b906282cecec4/src/js/react_views/IntlHelperBarView.jsx | src/js/react_views/IntlHelperBarView.jsx | var PropTypes = require('prop-types');
var HelperBarView = require('../react_views/HelperBarView.jsx');
var Main = require('../app');
var React = require('react');
var log = require('../log');
class IntlHelperBarView extends React.Component{
render() {
return (
<HelperBarView
items={this.getItem... | javascript | MIT | ab9f50900146ada578eeb8e0021b906282cecec4 | 2026-01-04T15:00:57.245895Z | false |
pcottle/learnGitBranching | https://github.com/pcottle/learnGitBranching/blob/ab9f50900146ada578eeb8e0021b906282cecec4/src/js/react_views/MainHelperBarView.jsx | src/js/react_views/MainHelperBarView.jsx | var HelperBarView = require('../react_views/HelperBarView.jsx');
var IntlHelperBarView =
require('../react_views/IntlHelperBarView.jsx');
var CommandsHelperBarView =
require('../react_views/CommandsHelperBarView.jsx');
var React = require('react');
var keyMirror = require('../util/keyMirror');
var log = require('.... | javascript | MIT | ab9f50900146ada578eeb8e0021b906282cecec4 | 2026-01-04T15:00:57.245895Z | false |
pcottle/learnGitBranching | https://github.com/pcottle/learnGitBranching/blob/ab9f50900146ada578eeb8e0021b906282cecec4/src/js/react_views/LevelToolbarView.jsx | src/js/react_views/LevelToolbarView.jsx | var React = require('react');
var PropTypes = require('prop-types');
var intl = require('../intl');
var reactUtil = require('../util/reactUtil');
class LevelToolbarView extends React.Component {
constructor(props, context) {
super(props, context);
this.state = {
isHidden: true,
isGoalExpanded: ... | javascript | MIT | ab9f50900146ada578eeb8e0021b906282cecec4 | 2026-01-04T15:00:57.245895Z | false |
pcottle/learnGitBranching | https://github.com/pcottle/learnGitBranching/blob/ab9f50900146ada578eeb8e0021b906282cecec4/src/js/react_views/CommandView.jsx | src/js/react_views/CommandView.jsx | var React = require('react');
var ReactDOM = require('react-dom');
var PropTypes = require('prop-types');
var reactUtil = require('../util/reactUtil');
var keyMirror = require('../util/keyMirror');
var STATUSES = keyMirror({
inqueue: null,
processing: null,
finished: null
});
class CommandView extends React.Co... | javascript | MIT | ab9f50900146ada578eeb8e0021b906282cecec4 | 2026-01-04T15:00:57.245895Z | false |
pcottle/learnGitBranching | https://github.com/pcottle/learnGitBranching/blob/ab9f50900146ada578eeb8e0021b906282cecec4/src/js/react_views/CommandsHelperBarView.jsx | src/js/react_views/CommandsHelperBarView.jsx | var React = require('react');
var PropTypes = require('prop-types');
var HelperBarView = require('../react_views/HelperBarView.jsx');
var Main = require('../app');
var log = require('../log');
var intl = require('../intl');
class CommandsHelperBarView extends React.Component {
render() {
return (
<Helper... | javascript | MIT | ab9f50900146ada578eeb8e0021b906282cecec4 | 2026-01-04T15:00:57.245895Z | false |
pcottle/learnGitBranching | https://github.com/pcottle/learnGitBranching/blob/ab9f50900146ada578eeb8e0021b906282cecec4/src/js/level/disabledMap.js | src/js/level/disabledMap.js | var intl = require('../intl');
var Commands = require('../commands');
var Errors = require('../util/errors');
var GitError = Errors.GitError;
function DisabledMap(options) {
options = options || {};
this.disabledMap = options.disabledMap || {
'git cherry-pick': true,
'git rebase': true
};
}
DisabledMa... | javascript | MIT | ab9f50900146ada578eeb8e0021b906282cecec4 | 2026-01-04T15:00:57.245895Z | false |
pcottle/learnGitBranching | https://github.com/pcottle/learnGitBranching/blob/ab9f50900146ada578eeb8e0021b906282cecec4/src/js/level/index.js | src/js/level/index.js | var Q = require('q');
var React = require('react');
var ReactDOM = require('react-dom');
var util = require('../util');
var Main = require('../app');
var intl = require('../intl');
var log = require('../log');
var Errors = require('../util/errors');
var Sandbox = require('../sandbox/').Sandbox;
var GlobalStateActions... | javascript | MIT | ab9f50900146ada578eeb8e0021b906282cecec4 | 2026-01-04T15:00:57.245895Z | false |
pcottle/learnGitBranching | https://github.com/pcottle/learnGitBranching/blob/ab9f50900146ada578eeb8e0021b906282cecec4/src/js/level/builder.js | src/js/level/builder.js | var Backbone = require('backbone');
var Q = require('q');
var util = require('../util');
var Main = require('../app');
var intl = require('../intl');
var Errors = require('../util/errors');
var Visualization = require('../visuals/visualization').Visualization;
var ParseWaterfall = require('../level/parseWaterfall').P... | javascript | MIT | ab9f50900146ada578eeb8e0021b906282cecec4 | 2026-01-04T15:00:57.245895Z | false |
pcottle/learnGitBranching | https://github.com/pcottle/learnGitBranching/blob/ab9f50900146ada578eeb8e0021b906282cecec4/src/js/level/parseWaterfall.js | src/js/level/parseWaterfall.js | var GitCommands = require('../git/commands');
var Commands = require('../commands');
var SandboxCommands = require('../sandbox/commands');
// more or less a static class
var ParseWaterfall = function(options) {
options = options || {};
this.options = options;
this.shortcutWaterfall = options.shortcutWaterfall ||... | javascript | MIT | ab9f50900146ada578eeb8e0021b906282cecec4 | 2026-01-04T15:00:57.245895Z | false |
pcottle/learnGitBranching | https://github.com/pcottle/learnGitBranching/blob/ab9f50900146ada578eeb8e0021b906282cecec4/src/js/log/index.js | src/js/log/index.js |
var log = function(category, action, label) {
window.gtag = window.gtag || function() {};
window.gtag('event', action, {
'event_category': category,
'event_label': label
});
//console.log('just logged ', [category, action, label].join('|'));
};
exports.viewInteracted = function(viewName) {
log('view... | javascript | MIT | ab9f50900146ada578eeb8e0021b906282cecec4 | 2026-01-04T15:00:57.245895Z | false |
pcottle/learnGitBranching | https://github.com/pcottle/learnGitBranching/blob/ab9f50900146ada578eeb8e0021b906282cecec4/src/js/sandbox/index.js | src/js/sandbox/index.js | var Q = require('q');
var Backbone = require('backbone');
var util = require('../util');
var intl = require('../intl');
var Main = require('../app');
var Errors = require('../util/errors');
var Visualization = require('../visuals/visualization').Visualization;
var ParseWaterfall = require('../level/parseWaterfall').P... | javascript | MIT | ab9f50900146ada578eeb8e0021b906282cecec4 | 2026-01-04T15:00:57.245895Z | false |
pcottle/learnGitBranching | https://github.com/pcottle/learnGitBranching/blob/ab9f50900146ada578eeb8e0021b906282cecec4/src/js/sandbox/commands.js | src/js/sandbox/commands.js | var util = require('../util');
var constants = require('../util/constants');
var intl = require('../intl');
var Commands = require('../commands');
var Errors = require('../util/errors');
var CommandProcessError = Errors.CommandProcessError;
var LocaleStore = require('../stores/LocaleStore');
var LocaleActions = requi... | javascript | MIT | ab9f50900146ada578eeb8e0021b906282cecec4 | 2026-01-04T15:00:57.245895Z | false |
pcottle/learnGitBranching | https://github.com/pcottle/learnGitBranching/blob/ab9f50900146ada578eeb8e0021b906282cecec4/src/js/constants/AppConstants.js | src/js/constants/AppConstants.js | "use strict";
var keyMirror = require('../util/keyMirror');
var CHANGE_EVENT = 'change';
module.exports = {
CHANGE_EVENT: CHANGE_EVENT,
StoreSubscribePrototype: {
subscribe: function(cb) {
this.on(CHANGE_EVENT, cb);
},
unsubscribe: function(cb) {
this.removeListener(CHANGE_EVENT, cb);
... | javascript | MIT | ab9f50900146ada578eeb8e0021b906282cecec4 | 2026-01-04T15:00:57.245895Z | false |
pcottle/learnGitBranching | https://github.com/pcottle/learnGitBranching/blob/ab9f50900146ada578eeb8e0021b906282cecec4/__tests__/base.js | __tests__/base.js | var Q = require('q');
var HeadlessGit = require('../src/js/git/headless').HeadlessGit;
var TreeCompare = require('../src/js/graph/treeCompare.js');
var loadTree = function(json) {
return JSON.parse(unescape(json));
};
var compareLevelTree = function(headless, levelBlob) {
var actualTree = headless.gitEngine.prin... | javascript | MIT | ab9f50900146ada578eeb8e0021b906282cecec4 | 2026-01-04T15:00:57.245895Z | false |
pcottle/learnGitBranching | https://github.com/pcottle/learnGitBranching/blob/ab9f50900146ada578eeb8e0021b906282cecec4/__tests__/vcs.spec.js | __tests__/vcs.spec.js | var Command = require('../src/js/models/commandModel').Command;
describe('commands', function() {
it('replaces . with HEAD correctly', function() {
var testCases = {
'.^': 'HEAD^',
'.': 'HEAD',
'.~4': 'HEAD~4'
};
var c = new Command({rawStr: 'foo'});
Object.keys(testCases).forEach(... | javascript | MIT | ab9f50900146ada578eeb8e0021b906282cecec4 | 2026-01-04T15:00:57.245895Z | false |
pcottle/learnGitBranching | https://github.com/pcottle/learnGitBranching/blob/ab9f50900146ada578eeb8e0021b906282cecec4/__tests__/visuals.spec.js | __tests__/visuals.spec.js |
var VisBranch = require('../src/js/visuals/visBranch');
var Backbone = require('backbone');
describe('visBranch', function() {
describe('getBranchColor', function() {
beforeEach(function() {
VisBranch.branchColorIndex = 0;
VisBranch.assignedBranchColors = {};
});
it('should return the corre... | javascript | MIT | ab9f50900146ada578eeb8e0021b906282cecec4 | 2026-01-04T15:00:57.245895Z | false |
pcottle/learnGitBranching | https://github.com/pcottle/learnGitBranching/blob/ab9f50900146ada578eeb8e0021b906282cecec4/__tests__/LocaleStore.spec.js | __tests__/LocaleStore.spec.js | var LocaleActions = require('../src/js/actions/LocaleActions');
var LocaleStore = require('../src/js/stores/LocaleStore');
describe('LocaleStore', function() {
it('has default locale', function() {
expect(LocaleStore.getLocale())
.toEqual(LocaleStore.getDefaultLocale());
});
it('changes locales', fun... | javascript | MIT | ab9f50900146ada578eeb8e0021b906282cecec4 | 2026-01-04T15:00:57.245895Z | false |
pcottle/learnGitBranching | https://github.com/pcottle/learnGitBranching/blob/ab9f50900146ada578eeb8e0021b906282cecec4/__tests__/mercurial.spec.js | __tests__/mercurial.spec.js | var base = require('./base');
var expectTreeAsync = base.expectTreeAsync;
describe('Mercurial', function() {
var assert = function(msg, command, tree) {
it(msg, function() {
return expectTreeAsync(command, tree);
});
};
assert(
'Commits',
'hg commit',
base.ONE_COMMIT_TREE
);
asser... | javascript | MIT | ab9f50900146ada578eeb8e0021b906282cecec4 | 2026-01-04T15:00:57.245895Z | false |
pcottle/learnGitBranching | https://github.com/pcottle/learnGitBranching/blob/ab9f50900146ada578eeb8e0021b906282cecec4/__tests__/simpleRemote.spec.js | __tests__/simpleRemote.spec.js | var base = require('./base');
var expectTreeAsync = base.expectTreeAsync;
describe('Git Remote simple', function() {
it('clones', function() {
return expectTreeAsync(
'git clone',
'{"branches":{"main":{"target":"C1","id":"main","remoteTrackingBranchID":"o/main"},"o/main":{"target":"C1","id":"o/main",... | javascript | MIT | ab9f50900146ada578eeb8e0021b906282cecec4 | 2026-01-04T15:00:57.245895Z | false |
pcottle/learnGitBranching | https://github.com/pcottle/learnGitBranching/blob/ab9f50900146ada578eeb8e0021b906282cecec4/__tests__/remote.spec.js | __tests__/remote.spec.js | var base = require('./base');
var intl = require('../src/js/intl');
var Q = require('q');
var expectTreeAsync = base.expectTreeAsync;
var runCommand = base.runCommand;
describe('Git Remotes', function() {
it('clones', function() {
return expectTreeAsync(
'git clone',
'{"branches":{"main":{"target":"C... | javascript | MIT | ab9f50900146ada578eeb8e0021b906282cecec4 | 2026-01-04T15:00:57.245895Z | true |
pcottle/learnGitBranching | https://github.com/pcottle/learnGitBranching/blob/ab9f50900146ada578eeb8e0021b906282cecec4/__tests__/create.js | __tests__/create.js | var TreeCompare = require('../src/js/graph/treeCompare');
var HeadlessGit = require('../src/js/git/headless').HeadlessGit;
var fs = require('fs');
prompt = require('prompt');
function getFile(truthy) {
var filename = (truthy) ?
'./git.spec.js' :
'./remote.spec.js';
return fs.readFileSync(filename, 'utf8')... | javascript | MIT | ab9f50900146ada578eeb8e0021b906282cecec4 | 2026-01-04T15:00:57.245895Z | false |
pcottle/learnGitBranching | https://github.com/pcottle/learnGitBranching/blob/ab9f50900146ada578eeb8e0021b906282cecec4/__tests__/CommandLineStore.spec.js | __tests__/CommandLineStore.spec.js | var CommandLineActions = require('../src/js/actions/CommandLineActions');
var CommandLineStore = require('../src/js/stores/CommandLineStore');
describe('this store', function() {
it('starts with no entries', function() {
expect(CommandLineStore.getCommandHistoryLength())
.toEqual(0);
});
it('receives... | javascript | MIT | ab9f50900146ada578eeb8e0021b906282cecec4 | 2026-01-04T15:00:57.245895Z | false |
pcottle/learnGitBranching | https://github.com/pcottle/learnGitBranching/blob/ab9f50900146ada578eeb8e0021b906282cecec4/__tests__/animation.spec.js | __tests__/animation.spec.js | var AnimationModule = require('../src/js/visuals/animation/index');
var PromiseAnimation = AnimationModule.PromiseAnimation;
var Animation = AnimationModule.Animation;
var Q = require('q');
describe('Promise animation', function() {
it('Will execute the closure', function() {
var value = 0;
var closure = fun... | javascript | MIT | ab9f50900146ada578eeb8e0021b906282cecec4 | 2026-01-04T15:00:57.245895Z | false |
pcottle/learnGitBranching | https://github.com/pcottle/learnGitBranching/blob/ab9f50900146ada578eeb8e0021b906282cecec4/__tests__/levels.spec.js | __tests__/levels.spec.js | var base = require('./base');
describe('GitEngine Levels', function() {
var sequences = require('../src/levels/index').levelSequences;
Object.keys(sequences).forEach(function(sequenceKey) {
var levels = sequences[sequenceKey];
Object.keys(levels).forEach(function(index) {
var levelBlob = levels[index... | javascript | MIT | ab9f50900146ada578eeb8e0021b906282cecec4 | 2026-01-04T15:00:57.245895Z | false |
pcottle/learnGitBranching | https://github.com/pcottle/learnGitBranching/blob/ab9f50900146ada578eeb8e0021b906282cecec4/__tests__/GlobalStateStore.spec.js | __tests__/GlobalStateStore.spec.js | var GlobalStateActions = require('../src/js/actions/GlobalStateActions');
var GlobalStateStore = require('../src/js/stores/GlobalStateStore');
describe('this store', function() {
it('is can change animating', function() {
expect(GlobalStateStore.getIsAnimating()).toEqual(false);
GlobalStateActions.changeIsAn... | javascript | MIT | ab9f50900146ada578eeb8e0021b906282cecec4 | 2026-01-04T15:00:57.245895Z | false |
pcottle/learnGitBranching | https://github.com/pcottle/learnGitBranching/blob/ab9f50900146ada578eeb8e0021b906282cecec4/__tests__/treeCompare.spec.js | __tests__/treeCompare.spec.js | var TreeCompare = require('../src/js/graph/treeCompare');
var loadTree = function(treeString) {
return TreeCompare.convertTreeSafe(treeString);
};
var testMethod = function(compareMethod, goalTreeString, cases, options) {
cases = cases || {};
options = options || {};
if (!options.dontCompareGoal) {
// alw... | javascript | MIT | ab9f50900146ada578eeb8e0021b906282cecec4 | 2026-01-04T15:00:57.245895Z | false |
pcottle/learnGitBranching | https://github.com/pcottle/learnGitBranching/blob/ab9f50900146ada578eeb8e0021b906282cecec4/__tests__/LevelStore.spec.js | __tests__/LevelStore.spec.js | var LevelActions = require('../src/js/actions/LevelActions');
var LevelStore = require('../src/js/stores/LevelStore');
describe('this store', function() {
it('has sequences and levels', function() {
var sequenceMap = LevelStore.getSequenceToLevels();
Object.keys(sequenceMap).forEach(function(levelSequence) ... | javascript | MIT | ab9f50900146ada578eeb8e0021b906282cecec4 | 2026-01-04T15:00:57.245895Z | false |
pcottle/learnGitBranching | https://github.com/pcottle/learnGitBranching/blob/ab9f50900146ada578eeb8e0021b906282cecec4/__tests__/git.spec.js | __tests__/git.spec.js | var intl = require('../src/js/intl')
var base = require('./base');
var expectTreeAsync = base.expectTreeAsync;
var runCommand = base.runCommand;
describe('Git', function() {
it('Commits', function() {
return expectTreeAsync(
'git commit',
base.ONE_COMMIT_TREE
);
});
it('handles commit option... | javascript | MIT | ab9f50900146ada578eeb8e0021b906282cecec4 | 2026-01-04T15:00:57.245895Z | true |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/stylelint.config.js | stylelint.config.js | const path = require('path');
module.exports = {
extends: 'stylelint-config-standard',
ignoreFiles: [path.resolve(__dirname, 'static', 'atom.less')],
rules: {
'color-hex-case': null, // TODO: enable?
'max-empty-lines': null, // TODO: enable?
'selector-type-no-unknown': null,
'function-comma-space... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/static/index.js | static/index.js | (function() {
// Define the window start time before the requires so we get a more accurate
// window:start marker.
const startWindowTime = Date.now();
const electron = require('electron');
const path = require('path');
const Module = require('module');
const getWindowLoadSettings = require('../src/get-w... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/benchmarks/text-editor-long-lines.bench.js | benchmarks/text-editor-long-lines.bench.js | const path = require('path');
const fs = require('fs');
const { TextEditor, TextBuffer } = require('atom');
const SIZES_IN_KB = [512, 1024, 2048];
const REPEATED_TEXT = fs
.readFileSync(
path.join(__dirname, '..', 'spec', 'fixtures', 'sample.js'),
'utf8'
)
.replace(/\n/g, '');
const TEXT = REPEATED_TEXT.... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/benchmarks/benchmark-runner.js | benchmarks/benchmark-runner.js | const Chart = require('chart.js');
const glob = require('glob');
const fs = require('fs-plus');
const path = require('path');
module.exports = async ({ test, benchmarkPaths }) => {
document.body.style.backgroundColor = '#ffffff';
document.body.style.overflow = 'auto';
let paths = [];
for (const benchmarkPath ... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/benchmarks/text-editor-large-file-construction.bench.js | benchmarks/text-editor-large-file-construction.bench.js | const { TextEditor, TextBuffer } = require('atom');
const MIN_SIZE_IN_KB = 0 * 1024;
const MAX_SIZE_IN_KB = 10 * 1024;
const SIZE_STEP_IN_KB = 1024;
const LINE_TEXT = 'Lorem ipsum dolor sit amet\n';
const TEXT = LINE_TEXT.repeat(
Math.ceil((MAX_SIZE_IN_KB * 1024) / LINE_TEXT.length)
);
module.exports = async ({ tes... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/exports/atom.js | exports/atom.js | const TextBuffer = require('text-buffer');
const { Point, Range } = TextBuffer;
const { File, Directory } = require('pathwatcher');
const { Emitter, Disposable, CompositeDisposable } = require('event-kit');
const BufferedNodeProcess = require('../src/buffered-node-process');
const BufferedProcess = require('../src/buff... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/exports/remote.js | exports/remote.js | module.exports = require('electron').remote;
const Grim = require('grim');
Grim.deprecate(
'Use `require("electron").remote` instead of `require("remote")`'
);
// Ensure each package that requires this shim causes a deprecation warning
delete require.cache[__filename];
| javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/exports/web-frame.js | exports/web-frame.js | module.exports = require('electron').webFrame;
const Grim = require('grim');
Grim.deprecate(
'Use `require("electron").webFrame` instead of `require("web-frame")`'
);
// Ensure each package that requires this shim causes a deprecation warning
delete require.cache[__filename];
| javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/exports/clipboard.js | exports/clipboard.js | module.exports = require('electron').clipboard;
const Grim = require('grim');
Grim.deprecate(
'Use `require("electron").clipboard` instead of `require("clipboard")`'
);
// Ensure each package that requires this shim causes a deprecation warning
delete require.cache[__filename];
| javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/exports/shell.js | exports/shell.js | module.exports = require('electron').shell;
const Grim = require('grim');
Grim.deprecate('Use `require("electron").shell` instead of `require("shell")`');
// Ensure each package that requires this shim causes a deprecation warning
delete require.cache[__filename];
| javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/exports/ipc.js | exports/ipc.js | module.exports = require('electron').ipcRenderer;
const Grim = require('grim');
Grim.deprecate(
'Use `require("electron").ipcRenderer` instead of `require("ipc")`'
);
// Ensure each package that requires this shim causes a deprecation warning
delete require.cache[__filename];
| javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/vendor/jasmine.js | vendor/jasmine.js | // Modified line
// - var isCommonJS = typeof window == "undefined" && typeof exports == "object";
// + var isCommonJS = typeof exports == "object";
//
// Modified method jasmine.WaitsForBlock.prototype.execute
var isCommonJS = typeof exports == "object";
/**
* Top level namespace for Jasmine, a lightweight JavaScri... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | true |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/vendor/jasmine-jquery.js | vendor/jasmine-jquery.js | 'use strict'
jasmine.JQuery = function() {}
jasmine.JQuery.browserTagCaseIndependentHtml = function(html) {
var div = document.createElement('div')
div.innerHTML = html
return div.innerHTML
}
jasmine.JQuery.elementToString = function(element) {
if (element instanceof HTMLElement) {
return element.outerHT... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/styles-element.js | src/styles-element.js | const { Emitter, CompositeDisposable } = require('event-kit');
class StylesElement extends HTMLElement {
constructor() {
super();
this.subscriptions = new CompositeDisposable();
this.emitter = new Emitter();
this.styleElementClonesByOriginalElement = new WeakMap();
this.context = null;
}
onD... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/electron-shims.js | src/electron-shims.js | const path = require('path');
const electron = require('electron');
const dirname = path.dirname;
path.dirname = function(path) {
if (typeof path !== 'string') {
path = '' + path;
const Grim = require('grim');
Grim.deprecate('Argument to `path.dirname` must be a string');
}
return dirname(path);
};
... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/grammar-registry.js | src/grammar-registry.js | const _ = require('underscore-plus');
const Grim = require('grim');
const CSON = require('season');
const FirstMate = require('first-mate');
const { Disposable, CompositeDisposable } = require('event-kit');
const TextMateLanguageMode = require('./text-mate-language-mode');
const TreeSitterLanguageMode = require('./tree... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/dock.js | src/dock.js | const etch = require('etch');
const _ = require('underscore-plus');
const { CompositeDisposable, Emitter } = require('event-kit');
const PaneContainer = require('./pane-container');
const TextEditor = require('./text-editor');
const Grim = require('grim');
const $ = etch.dom;
const MINIMUM_SIZE = 100;
const DEFAULT_IN... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/panel-container-element.js | src/panel-container-element.js | 'use strict';
const { createFocusTrap } = require('focus-trap');
const { CompositeDisposable } = require('event-kit');
class PanelContainerElement extends HTMLElement {
constructor() {
super();
this.subscriptions = new CompositeDisposable();
}
connectedCallback() {
if (this.model.dock) {
this... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/auto-update-manager.js | src/auto-update-manager.js | const { Emitter, CompositeDisposable } = require('event-kit');
module.exports = class AutoUpdateManager {
constructor({ applicationDelegate }) {
this.applicationDelegate = applicationDelegate;
this.subscriptions = new CompositeDisposable();
this.emitter = new Emitter();
}
initialize() {
this.sub... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/style-manager.js | src/style-manager.js | const { Emitter, Disposable } = require('event-kit');
const crypto = require('crypto');
const fs = require('fs-plus');
const path = require('path');
const postcss = require('postcss');
const selectorParser = require('postcss-selector-parser');
const { createStylesElement } = require('./styles-element');
const DEPRECATE... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/config-file.js | src/config-file.js | const _ = require('underscore-plus');
const fs = require('fs-plus');
const dedent = require('dedent');
const { Disposable, Emitter } = require('event-kit');
const { watchPath } = require('./path-watcher');
const CSON = require('season');
const Path = require('path');
const asyncQueue = require('async/queue');
const EV... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/typescript.js | src/typescript.js | 'use strict';
const _ = require('underscore-plus');
const crypto = require('crypto');
const path = require('path');
const defaultOptions = {
target: 1,
module: 'commonjs',
sourceMap: true
};
let TypeScriptSimple = null;
let typescriptVersionDir = null;
exports.shouldCompile = function() {
return true;
};
e... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/git-repository-provider.js | src/git-repository-provider.js | const fs = require('fs');
const { Directory } = require('pathwatcher');
const GitRepository = require('./git-repository');
const GIT_FILE_REGEX = RegExp('^gitdir: (.+)');
// Returns the .gitdir path in the agnostic Git symlink .git file given, or
// null if the path is not a valid gitfile.
//
// * `gitFile` {String} ... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/path-watcher.js | src/path-watcher.js | const fs = require('fs');
const path = require('path');
const { Emitter, Disposable, CompositeDisposable } = require('event-kit');
const nsfw = require('@atom/nsfw');
const watcher = require('@atom/watcher');
const { NativeWatcherRegistry } = require('./native-watcher-registry');
// Private: Associate native watcher ... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/syntax-scope-map.js | src/syntax-scope-map.js | const parser = require('postcss-selector-parser');
module.exports = class SyntaxScopeMap {
constructor(resultsBySelector) {
this.namedScopeTable = {};
this.anonymousScopeTable = {};
for (let selector in resultsBySelector) {
this.addSelector(selector, resultsBySelector[selector]);
}
setTable... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/get-app-name.js | src/get-app-name.js | const { app } = require('electron');
const getReleaseChannel = require('./get-release-channel');
module.exports = function getAppName() {
if (process.type === 'renderer') {
return atom.getAppName();
}
const releaseChannel = getReleaseChannel(app.getVersion());
const appNameParts = [app.getName()];
if (... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/reopen-project-menu-manager.js | src/reopen-project-menu-manager.js | const { CompositeDisposable } = require('event-kit');
const path = require('path');
module.exports = class ReopenProjectMenuManager {
constructor({ menu, commands, history, config, open }) {
this.menuManager = menu;
this.historyManager = history;
this.config = config;
this.open = open;
this.proje... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/gutter-container.js | src/gutter-container.js | const { Emitter } = require('event-kit');
const Gutter = require('./gutter');
module.exports = class GutterContainer {
constructor(textEditor) {
this.gutters = [];
this.textEditor = textEditor;
this.emitter = new Emitter();
}
scheduleComponentUpdate() {
this.textEditor.scheduleComponentUpdate();... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/tooltip-manager.js | src/tooltip-manager.js | const _ = require('underscore-plus');
const { Disposable, CompositeDisposable } = require('event-kit');
let Tooltip = null;
// Essential: Associates tooltips with HTML elements.
//
// You can get the `TooltipManager` via `atom.tooltips`.
//
// ## Examples
//
// The essence of displaying a tooltip
//
// ```js
// // dis... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/workspace-element.js | src/workspace-element.js | 'use strict';
const { ipcRenderer } = require('electron');
const path = require('path');
const fs = require('fs-plus');
const { CompositeDisposable, Disposable } = require('event-kit');
const scrollbarStyle = require('scrollbar-style');
const _ = require('underscore-plus');
class WorkspaceElement extends HTMLElement ... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/decoration.js | src/decoration.js | const { Emitter } = require('event-kit');
let idCounter = 0;
const nextId = () => idCounter++;
const normalizeDecorationProperties = function(decoration, decorationParams) {
decorationParams.id = decoration.id;
if (
decorationParams.type === 'line-number' &&
decorationParams.gutterName == null
) {
... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/initialize-test-window.js | src/initialize-test-window.js | const ipcHelpers = require('./ipc-helpers');
const { requireModule } = require('./module-utils');
function cloneObject(object) {
const clone = {};
for (const key in object) {
clone[key] = object[key];
}
return clone;
}
module.exports = async function({ blobStore }) {
const { remote } = require('electron... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/default-directory-searcher.js | src/default-directory-searcher.js | const Task = require('./task');
// Searches local files for lines matching a specified regex. Implements `.then()`
// so that it can be used with `Promise.all()`.
class DirectorySearch {
constructor(rootPaths, regex, options) {
const scanHandlerOptions = {
ignoreCase: regex.ignoreCase,
inclusions: op... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/compile-cache.js | src/compile-cache.js | 'use strict';
// Atom's compile-cache when installing or updating packages, called by apm's Node-js
const path = require('path');
const fs = require('fs-plus');
const sourceMapSupport = require('@atom/source-map-support');
const PackageTranspilationRegistry = require('./package-transpilation-registry');
let CSON = n... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/selectors.js | src/selectors.js | module.exports = { selectorMatchesAnyScope, matcherForSelector };
const { isSubset } = require('underscore-plus');
// Private: Parse a selector into parts.
// If already parsed, returns the selector unmodified.
//
// * `selector` a {String|Array<String>} specifying what to match
// Returns selector parts, an... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/theme-package.js | src/theme-package.js | const path = require('path');
const Package = require('./package');
module.exports = class ThemePackage extends Package {
getType() {
return 'theme';
}
getStyleSheetPriority() {
return 1;
}
enable() {
this.config.unshiftAtKeyPath('core.themes', this.name);
}
disable() {
this.config.rem... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/text-editor-component.js | src/text-editor-component.js | /* global ResizeObserver */
const etch = require('etch');
const { Point, Range } = require('text-buffer');
const LineTopIndex = require('line-top-index');
const TextEditor = require('./text-editor');
const { isPairedCharacter } = require('./text-utils');
const electron = require('electron');
const clipboard = electron... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | true |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/deprecated-syntax-selectors.js | src/deprecated-syntax-selectors.js | module.exports = new Set([
'AFDKO',
'AFKDO',
'ASS',
'AVX',
'AVX2',
'AVX512',
'AVX512BW',
'AVX512DQ',
'Alignment',
'Alpha',
'AlphaLevel',
'Angle',
'Animation',
'AnimationGroup',
'ArchaeologyDigSiteFrame',
'Arrow__',
'AtLilyPond',
'AttrBaseType',
'AttrSetVal__',
'BackColour',
'Ba... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | true |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/task-bootstrap.js | src/task-bootstrap.js | const { userAgent } = process.env;
const [compileCachePath, taskPath] = process.argv.slice(2);
const CompileCache = require('./compile-cache');
CompileCache.setCacheDirectory(compileCachePath);
CompileCache.install(`${process.resourcesPath}`, require);
const setupGlobals = function() {
global.attachEvent = function... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/gutter.js | src/gutter.js | const { Emitter } = require('event-kit');
const DefaultPriority = -100;
// Extended: Represents a gutter within a {TextEditor}.
//
// See {TextEditor::addGutter} for information on creating a gutter.
module.exports = class Gutter {
constructor(gutterContainer, options) {
this.gutterContainer = gutterContainer;
... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/package-manager.js | src/package-manager.js | const path = require('path');
let normalizePackageData = null;
const _ = require('underscore-plus');
const { Emitter } = require('event-kit');
const fs = require('fs-plus');
const CSON = require('season');
const ServiceHub = require('service-hub');
const Package = require('./package');
const ThemePackage = require('.... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/buffered-process.js | src/buffered-process.js | const _ = require('underscore-plus');
const ChildProcess = require('child_process');
const { Emitter } = require('event-kit');
const path = require('path');
// Extended: A wrapper which provides standard error/output line buffering for
// Node's ChildProcess.
//
// ## Examples
//
// ```js
// {BufferedProcess} = requir... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/application-delegate.js | src/application-delegate.js | const { ipcRenderer, remote, shell } = require('electron');
const ipcHelpers = require('./ipc-helpers');
const { Emitter, Disposable } = require('event-kit');
const getWindowLoadSettings = require('./get-window-load-settings');
module.exports = class ApplicationDelegate {
constructor() {
this.pendingSettingsUpda... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/text-mate-language-mode.js | src/text-mate-language-mode.js | const _ = require('underscore-plus');
const { CompositeDisposable, Emitter } = require('event-kit');
const { Point, Range } = require('text-buffer');
const TokenizedLine = require('./tokenized-line');
const TokenIterator = require('./token-iterator');
const ScopeDescriptor = require('./scope-descriptor');
const NullGra... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/theme-manager.js | src/theme-manager.js | /* global snapshotAuxiliaryData */
const path = require('path');
const _ = require('underscore-plus');
const { Emitter, CompositeDisposable } = require('event-kit');
const { File } = require('pathwatcher');
const fs = require('fs-plus');
const LessCompileCache = require('./less-compile-cache');
// Extended: Handles l... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/crash-reporter-start.js | src/crash-reporter-start.js | module.exports = function(params) {
const { crashReporter } = require('electron');
const os = require('os');
const platformRelease = os.release();
const arch = os.arch();
const { uploadToServer, releaseChannel } = params;
const parsedUploadToServer = uploadToServer !== null ? uploadToServer : false;
cra... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/startup-time.js | src/startup-time.js | let startTime;
let markers = [];
module.exports = {
setStartTime() {
if (!startTime) {
startTime = Date.now();
}
},
addMarker(label, dateTime) {
if (!startTime) {
return;
}
dateTime = dateTime || Date.now();
markers.push({ label, time: dateTime - startTime });
},
importDa... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/first-mate-helpers.js | src/first-mate-helpers.js | module.exports = {
fromFirstMateScopeId(firstMateScopeId) {
let atomScopeId = -firstMateScopeId;
if ((atomScopeId & 1) === 0) atomScopeId--;
return atomScopeId + 256;
},
toFirstMateScopeId(atomScopeId) {
return -(atomScopeId - 256);
}
};
| javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/null-grammar.js | src/null-grammar.js | const { Disposable } = require('event-kit');
module.exports = {
name: 'Null Grammar',
scopeName: 'text.plain.null-grammar',
scopeForId(id) {
if (id === -1 || id === -2) {
return this.scopeName;
} else {
return null;
}
},
startIdForScope(scopeName) {
if (scopeName === this.scopeNam... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/panel.js | src/panel.js | const { Emitter } = require('event-kit');
// Extended: A container representing a panel on the edges of the editor window.
// You should not create a `Panel` directly, instead use {Workspace::addTopPanel}
// and friends to add panels.
//
// Examples: [status-bar](https://github.com/atom/status-bar)
// and [find-and-re... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/text-utils.js | src/text-utils.js | const isHighSurrogate = charCode => charCode >= 0xd800 && charCode <= 0xdbff;
const isLowSurrogate = charCode => charCode >= 0xdc00 && charCode <= 0xdfff;
const isVariationSelector = charCode =>
charCode >= 0xfe00 && charCode <= 0xfe0f;
const isCombiningCharacter = charCode =>
(charCode >= 0x0300 && charCode <= ... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/title-bar.js | src/title-bar.js | module.exports = class TitleBar {
constructor({ workspace, themes, applicationDelegate }) {
this.dblclickHandler = this.dblclickHandler.bind(this);
this.workspace = workspace;
this.themes = themes;
this.applicationDelegate = applicationDelegate;
this.element = document.createElement('div');
th... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/tree-sitter-grammar.js | src/tree-sitter-grammar.js | const path = require('path');
const SyntaxScopeMap = require('./syntax-scope-map');
const Module = require('module');
module.exports = class TreeSitterGrammar {
constructor(registry, filePath, params) {
this.registry = registry;
this.name = params.name;
this.scopeName = params.scopeName;
// TODO - R... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/initialize-benchmark-window.js | src/initialize-benchmark-window.js | const { remote } = require('electron');
const path = require('path');
const ipcHelpers = require('./ipc-helpers');
const util = require('util');
module.exports = async function() {
const getWindowLoadSettings = require('./get-window-load-settings');
const {
test,
headless,
resourcePath,
benchmarkPa... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/state-store.js | src/state-store.js | 'use strict';
module.exports = class StateStore {
constructor(databaseName, version) {
this.connected = false;
this.databaseName = databaseName;
this.version = version;
}
get dbPromise() {
if (!this._dbPromise) {
this._dbPromise = new Promise(resolve => {
const dbOpenRequest = inde... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/ripgrep-directory-searcher.js | src/ripgrep-directory-searcher.js | const { spawn } = require('child_process');
const path = require('path');
// `ripgrep` and `scandal` have a different way of handling the trailing and leading
// context lines:
// * `scandal` returns all the context lines that are requested, even if they include
// previous or future results.
// * `ripgrep` is a ... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/selection.js | src/selection.js | const { Point, Range } = require('text-buffer');
const { pick } = require('underscore-plus');
const { Emitter } = require('event-kit');
const NonWhitespaceRegExp = /\S/;
let nextId = 0;
// Extended: Represents a selection in the {TextEditor}.
module.exports = class Selection {
constructor({ cursor, marker, editor, ... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | true |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/decoration-manager.js | src/decoration-manager.js | const { Emitter } = require('event-kit');
const Decoration = require('./decoration');
const LayerDecoration = require('./layer-decoration');
module.exports = class DecorationManager {
constructor(editor) {
this.editor = editor;
this.displayLayer = this.editor.displayLayer;
this.emitter = new Emitter();
... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/text-editor-registry.js | src/text-editor-registry.js | const _ = require('underscore-plus');
const { Emitter, Disposable, CompositeDisposable } = require('event-kit');
const TextEditor = require('./text-editor');
const ScopeDescriptor = require('./scope-descriptor');
const EDITOR_PARAMS_BY_SETTING_KEY = [
['core.fileEncoding', 'encoding'],
['editor.atomicSoftTabs', 'a... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/src/pane-container.js | src/pane-container.js | const { find } = require('underscore-plus');
const { Emitter, CompositeDisposable } = require('event-kit');
const Pane = require('./pane');
const ItemRegistry = require('./item-registry');
const { createPaneContainerElement } = require('./pane-container-element');
const SERIALIZATION_VERSION = 1;
const STOPPED_CHANGIN... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.