ui

v1.0.0arrow_drop_down
v1.0.0
STATUS
None
DOWNLOADS
5
VISIBILITY
Public
PUBLISHED
5 years ago
SIZE
2 KB
Computes the difference between two array references.
1 contributor
Install ui as a package?
Copied
npm i @bit/ebyjane.angular.global.ui
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.cloud
Files
  • array
    • diff.js
    • first.js
    • flatMap.js
    • make.js
  • bit
    • scopeClient.js
  • buffer
    • from.js
  • cryptography
    • sha1.js
  • file
    • extractFileNameFromPath
      • index.js
  • function
    • compose.js
    • pipe.js
  • kubernetes
    • toKubeformat.js
  • number
    • clamp.js
  • object
    • clean.js
    • evolve.js
    • forEach.js
    • groupBy.js
    • hasOwnProperty.js
    • map.js
    • merge-all.js
    • merge.js
    • values.js
  • redis
    • getData.js
    • setData.js
  • ssh
    • parseUrl.js
  • string
    • cleanChar.js
    • contains.js
    • fromBase64.js
    • leftPad.js
    • removeNewLines.js
    • startsWithOneOf
      • index.js
    • toBase64.js
  • validation
    • empty.js
    • isEmail.js
    • isNil.js
    • isNumber.js
    • isString.js
file/extractFileNameFromPath/index.js
12 Lines(5 sloc)
1
2
3
4
5
6
7
8
9
10
11
12
13
import path from 'path';

/**
@name extractFileNameFromPath
@description Recieves a file path and returns the file name
@param {string} filePath
@returns {string}
*/
export default function(filePath) {
    let fileName = filePath.split(path.sep).pop();
    return fileName.substring(0, fileName.lastIndexOf('.'));
}
Help and resources