forked from daren.hsu/line_push
update
This commit is contained in:
+3
@@ -0,0 +1,3 @@
|
||||
declare function camelCase (value: string, locale?: string, mergeNumbers?: boolean): string;
|
||||
|
||||
export = camelCase;
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
var upperCase = require('upper-case')
|
||||
var noCase = require('no-case')
|
||||
|
||||
/**
|
||||
* Camel case a string.
|
||||
*
|
||||
* @param {string} value
|
||||
* @param {string} [locale]
|
||||
* @return {string}
|
||||
*/
|
||||
module.exports = function (value, locale, mergeNumbers) {
|
||||
var result = noCase(value, locale)
|
||||
|
||||
// Replace periods between numeric entities with an underscore.
|
||||
if (!mergeNumbers) {
|
||||
result = result.replace(/ (?=\d)/g, '_')
|
||||
}
|
||||
|
||||
// Replace spaces between words with an upper cased character.
|
||||
return result.replace(/ (.)/g, function (m, $1) {
|
||||
return upperCase($1, locale)
|
||||
})
|
||||
}
|
||||
+39
-72
@@ -1,117 +1,84 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"camel-case@4.1.1",
|
||||
"/mnt/Foxconn/Digitalent/Deverloper/liff-push_2series"
|
||||
"camel-case@3.0.0",
|
||||
"/home/node/nuxt"
|
||||
]
|
||||
],
|
||||
"_from": "camel-case@4.1.1",
|
||||
"_id": "camel-case@4.1.1",
|
||||
"_from": "camel-case@3.0.0",
|
||||
"_id": "camel-case@3.0.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-7fa2WcG4fYFkclIvEmxBbTvmibwF2/agfEBc6q3lOpVu0A13ltLsA+Hr/8Hp6kp5f+G7hKi6t8lys6XxP+1K6Q==",
|
||||
"_integrity": "sha512-+MbKztAYHXPr1jNTSKQF52VpcFjwY5RkR7fxksV8Doo4KAYc5Fl4UJRgthBbTmEx8C54DqahhbLJkDwjI3PI/w==",
|
||||
"_location": "/camel-case",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "camel-case@4.1.1",
|
||||
"raw": "camel-case@3.0.0",
|
||||
"name": "camel-case",
|
||||
"escapedName": "camel-case",
|
||||
"rawSpec": "4.1.1",
|
||||
"rawSpec": "3.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "4.1.1"
|
||||
"fetchSpec": "3.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/html-minifier-terser"
|
||||
"/html-minifier"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/camel-case/-/camel-case-4.1.1.tgz",
|
||||
"_spec": "4.1.1",
|
||||
"_where": "/mnt/Foxconn/Digitalent/Deverloper/liff-push_2series",
|
||||
"_resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz",
|
||||
"_spec": "3.0.0",
|
||||
"_where": "/home/node/nuxt",
|
||||
"author": {
|
||||
"name": "Blake Embrey",
|
||||
"email": "hello@blakeembrey.com",
|
||||
"url": "http://blakeembrey.me"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/blakeembrey/change-case/issues"
|
||||
"url": "https://github.com/blakeembrey/camel-case/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"pascal-case": "^3.1.1",
|
||||
"tslib": "^1.10.0"
|
||||
"no-case": "^2.2.0",
|
||||
"upper-case": "^1.1.1"
|
||||
},
|
||||
"description": "Transform into a string with the separator denoted by the next word capitalized",
|
||||
"description": "Camel case a string",
|
||||
"devDependencies": {
|
||||
"@size-limit/preset-small-lib": "^2.2.1",
|
||||
"@types/jest": "^24.0.23",
|
||||
"@types/node": "^12.12.14",
|
||||
"jest": "^24.9.0",
|
||||
"rimraf": "^3.0.0",
|
||||
"ts-jest": "^24.2.0",
|
||||
"tslint": "^5.20.1",
|
||||
"tslint-config-prettier": "^1.18.0",
|
||||
"tslint-config-standard": "^9.0.0",
|
||||
"typescript": "^3.7.2"
|
||||
"istanbul": "^0.4.3",
|
||||
"mocha": "^2.2.1",
|
||||
"standard": "^7.1.2"
|
||||
},
|
||||
"files": [
|
||||
"dist/",
|
||||
"dist.es2015/",
|
||||
"camel-case.js",
|
||||
"camel-case.d.ts",
|
||||
"LICENSE"
|
||||
],
|
||||
"gitHead": "1c1377a692d328ae01221b2a1532bade38e1eaa3",
|
||||
"homepage": "https://github.com/blakeembrey/change-case/tree/master/packages/camel-case#readme",
|
||||
"jest": {
|
||||
"roots": [
|
||||
"<rootDir>/src/"
|
||||
],
|
||||
"transform": {
|
||||
"\\.tsx?$": "ts-jest"
|
||||
},
|
||||
"testRegex": "(/__tests__/.*|\\.(test|spec))\\.(tsx?|jsx?)$",
|
||||
"moduleFileExtensions": [
|
||||
"ts",
|
||||
"tsx",
|
||||
"js",
|
||||
"jsx",
|
||||
"json",
|
||||
"node"
|
||||
]
|
||||
},
|
||||
"jsnext:main": "dist.es2015/index.js",
|
||||
"homepage": "https://github.com/blakeembrey/camel-case",
|
||||
"keywords": [
|
||||
"camel",
|
||||
"case",
|
||||
"camelcase",
|
||||
"camel-case",
|
||||
"convert",
|
||||
"transform",
|
||||
"identifier"
|
||||
"dash",
|
||||
"hyphen",
|
||||
"dot",
|
||||
"underscore",
|
||||
"lodash",
|
||||
"separator",
|
||||
"string",
|
||||
"text",
|
||||
"convert"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "dist/index.js",
|
||||
"module": "dist.es2015/index.js",
|
||||
"main": "camel-case.js",
|
||||
"name": "camel-case",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/blakeembrey/change-case.git"
|
||||
"url": "git://github.com/blakeembrey/camel-case.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "rimraf dist/ dist.es2015/ && tsc && tsc -P tsconfig.es2015.json",
|
||||
"lint": "tslint \"src/**/*\" --project tsconfig.json",
|
||||
"prepare": "npm run build",
|
||||
"size": "size-limit",
|
||||
"specs": "jest --coverage",
|
||||
"test": "npm run build && npm run lint && npm run specs"
|
||||
"lint": "standard",
|
||||
"test": "npm run lint && npm run test-cov",
|
||||
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- -R spec --bail",
|
||||
"test-spec": "mocha -- -R spec --bail"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"size-limit": [
|
||||
{
|
||||
"path": "dist/index.js",
|
||||
"limit": "450 B"
|
||||
}
|
||||
],
|
||||
"typings": "dist/index.d.ts",
|
||||
"version": "4.1.1"
|
||||
"typings": "camel-case.d.ts",
|
||||
"version": "3.0.0"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user