os#homedir JavaScript Examples

The following examples show how to use os#homedir. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: node.spec.js    From slashtags with MIT License 6 votes vote down vote up
describe('Storage nodejs', () => {
  it('should return the default Directory if path not defined', () => {
    const store = storage()
    expect(store).eql(homedir() + '/' + '.slashtags/')
  })

  it('should accept custom storage directory', () => {
    const store = storage('./foo')
    expect(store).eql('./foo')
  })
})
Example #2
Source File: Helpers.js    From SnipCommand with MIT License 5 votes vote down vote up
defaultPath = isWin ? `${homedir()}\\${App.folderName}` : `${homedir()}/${App.folderName}`
Example #3
Source File: storage.js    From slashtags with MIT License 5 votes vote down vote up
DEFAULT_DIRECTORY_PATH = homedir() + '/' + DEFAULT_DIRECTORY + '/'